Skip to content

FortniteStats Updater #67798

FortniteStats Updater

FortniteStats Updater #67798

Workflow file for this run

name: FortniteStats Updater
on:
schedule:
- cron: '*/5 * * * *'
workflow_run:
workflows: ["metrics"]
branches: [master]
types:
- completed
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: 🎏 Fetch Repository
uses: actions/checkout@master
with:
fetch-depth: 1
- name: 🎏 Fetch Fortnite Stats
run: |
cd ${GITHUB_WORKSPACE}/
npm i twitter
node src/update.js
env:
API_SECRET: ${{ secrets.FN_API_KEY }}
FORTNITE_USERNAME: ${{ secrets.FORTNITE_USERNAME }}
TWITTER_API_KEY: ${{ secrets.TWITTER_API_KEY }}
TWITTER_SECRET: ${{ secrets.TWITTER_SECRET }}
TWITTER_ACCESS_KEY: ${{ secrets.TWITTER_ACCESS_KEY }}
TWITTER_TOKEN_SECRET: ${{ secrets.TWITTER_TOKEN_SECRET }}
- name: 🚀 Deploy Update
run: |
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
git add .
git commit -am "[Auto] Updated ${{ secrets.FORTNITE_USERNAME }}'s Stats"
git push --all -f https://${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git