diff --git a/.github/workflows/Docs.yml b/.github/workflows/Docs.yml index e012053..4e60a8d 100644 --- a/.github/workflows/Docs.yml +++ b/.github/workflows/Docs.yml @@ -6,8 +6,6 @@ on: - main tags: '*' pull_request: - branches: - - main concurrency: # Skip intermediate builds: always. @@ -25,4 +23,4 @@ jobs: steps: - name: Build and deploy Documenter.jl docs - uses: TuringLang/DocsNav/DocsDocumenter@v2 + uses: TuringLang/actions/DocsDocumenter@main diff --git a/.github/workflows/DocsNav.yml b/.github/workflows/DocsNav.yml new file mode 100644 index 0000000..7e86195 --- /dev/null +++ b/.github/workflows/DocsNav.yml @@ -0,0 +1,39 @@ +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