Update slippi rankings #2282
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: Update slippi rankings | |
on: | |
schedule: | |
- cron: "0 * * * *" | |
jobs: | |
update: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: '21.6.1' | |
- name: Install project dependencies | |
run: yarn install | |
shell: bash | |
- name: Load secrets | |
run: | | |
mkdir -p ./secrets | |
cat << EOF > ./secrets/creds.json | |
${{ secrets.GOOGLE_CREDS }} | |
EOF | |
shell: bash | |
- uses: actions/download-artifact@v4 | |
continue-on-error: true | |
with: | |
name: player-data | |
path: cron/data/players-new.json | |
run-id: ${{ github.event.workflow_run.id }} | |
github-token: ${{ github.token }} | |
- name: Load latest player data and deploy to github pages | |
run: | | |
git remote set-url origin https://git:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git | |
./cron/run.sh | |
shell: bash | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: player-data | |
path: cron/data/players-new.json | |
overwrite: true | |
run-id: ${{ github.event.workflow_run.id }} | |
github-token: ${{ github.token }} |