Generate prompts #110
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: Generate prompts | |
on: | |
push: | |
branches: | |
- master | |
schedule: | |
- cron: '0 0 * * *' # This runs the workflow daily at midnight | |
jobs: | |
update_files: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v2 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18' | |
- name: Install dependencies | |
run: npm install --legacy-peer-deps | |
- name: Run the script | |
run: sh src/prompt/prompt.sh | |
env: | |
GATSBY_OPENAI_KEY: ${{ secrets.GATSBY_OPENAI_KEY }} | |
- name: Commit and push changes | |
run: | | |
git config --global user.name 'github-actions[bot]' | |
git config --global user.email 'github-actions[bot]@users.noreply.github.com' | |
git add . | |
git commit -m 'Updated prompts' | |
git push | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |