Manual CI/CD Update #40
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: Manual CI/CD Update | |
on: | |
schedule: | |
- cron: "0 0 * * *" | |
workflow_dispatch: | |
jobs: | |
update-json: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v2 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "lts/*" | |
- name: Install Dependencies | |
run: npm install | |
- name: Run Manual Update | |
run: node ./modules/initialUpdate.js | |
- name: Commit and Push Changes | |
run: | | |
git config --global user.name '${{ secrets.GH_USERNAME }}' | |
git config --global user.email '${{ secrets.GH_EMAIL }}' | |
git add ./public/topGames.json | |
git commit -m 'Daily update of top games JSON data' | |
git push origin main | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |