Scheduler #52067
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' |