update documentation #50
This file contains hidden or 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 Documentation | |
| on: | |
| schedule: | |
| - cron: '0 0 * * *' | |
| jobs: | |
| update-docs: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set Up Git | |
| run: | | |
| git config --global user.name "GitHub Actions Bot" | |
| git config --global user.email "actions@github.com" | |
| - name: Run Update Script | |
| run: | | |
| chmod +x ./update_docs.sh | |
| ./update_docs.sh | |
| - name: Commit and Push Changes | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| git add -A | |
| if git diff --cached --quiet; then | |
| echo "No changes detected." | |
| else | |
| git commit -m "Automated update of documentation" | |
| git push origin HEAD:${{ github.ref }} | |
| fi |