Rebuild docs with newest navbar #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
name: Rebuild docs with newest navbar | |
on: | |
# 3:25 AM UTC every Sunday -- choose an uncommon time to avoid | |
# periods of heavy GitHub Actions usage | |
schedule: | |
- cron: '25 3 * * 0' | |
# Whenever needed | |
workflow_dispatch: | |
permissions: | |
contents: write | |
jobs: | |
update-navbar: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout gh-pages branch | |
uses: actions/checkout@v4 | |
with: | |
ref: gh-pages | |
- name: Insert navbar | |
uses: TuringLang/actions/DocsNav@main | |
with: | |
doc-path: '.' | |
- name: Commit and push changes | |
run: | | |
if [[ -n $(git status -s) ]]; then | |
git config user.name github-actions[bot] | |
git config user.email github-actions[bot]@users.noreply.github.com | |
git add -A | |
git commit -m "Update navbar (automated)" | |
git push | |
else | |
echo "No changes to commit" | |
fi |