.github/workflows/get-github-api-data.yml #113
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
on: | |
workflow_dispatch: | |
inputs: | |
trigger: | |
description: 'Manual trigger for GitHub API data fetch' | |
required: true | |
default: 'true' | |
schedule: | |
- cron: '45 * * * *' | |
jobs: | |
my-job: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Get github data | |
uses: actions/checkout@v4 | |
- name: Run script with secret | |
env: | |
GH_API_KEY: ${{ secrets.GH_API_KEY }} | |
run: | | |
cd website | |
npm install | |
npm run build | |
npm run update-gh-data | |
git config --global user.name 'nabrams' | |
git config --global user.email 'nabrams94@gmail.com' | |
cd .. && git add . && git commit -m "Update GitHub data" && git push |