-
Notifications
You must be signed in to change notification settings - Fork 1
54 lines (49 loc) · 1.39 KB
/
scheduler.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Scheduler
on:
schedule:
- cron: '*/12 * * * *'
push:
branches:
- main
workflow_dispatch:
inputs:
note:
description: 'Note'
required: false
default: ''
concurrency: 'main'
jobs:
master:
if: "! startsWith(github.event.head_commit.message, '[CI Skip]')"
runs-on: ubuntu-latest
name: Earning Scheduler
steps:
- uses: actions/checkout@v4
with:
ref: main
fetch-depth: 0
token: ${{ secrets.GH_AUTOMATION_TOKEN }}
- name: Update data
env:
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: true
PUPPETEER_EXECUTABLE_PATH: /usr/bin/google-chrome
run: |
yarn install
NODE_ENV=production yarn fetch-data
- name: Deploy to Cloudflare Pages
id: cloudflare_deployment
uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: 'sw-static-cache'
gitHubToken: ${{ secrets.GH_AUTOMATION_TOKEN }}
branch: ${{ github.ref_name }}
directory: './data'
wranglerVersion: '3'
- name: Commit changes
uses: EndBug/add-and-commit@v9
with:
author_name: Scheduler
author_email: [email protected]
message: '[CI Skip] Update earning data'