Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 25 additions & 14 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,19 @@ on:
- 'docs/**' # Trigger only on changes within the docs directory
workflow_dispatch: # Allows manual triggering

# Required for GitHub Pages API deployment
permissions:
contents: write # Needed to push to gh-pages branch
contents: read
pages: write # Needed to push to gh-pages branch
id-token: write

# Allow only one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
deploy-docs:
build-docs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
Expand Down Expand Up @@ -44,19 +52,22 @@ jobs:
# Run make html inside the docs directory
make -C docs html

- name: Create .nojekyll file
- name: Create .nojekyll file again
run: |
touch docs/_build/html/.nojekyll

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/_build/html # Directory containing the built HTML
publish_branch: gh-pages # Target branch
force_orphan: true # Creates a clean history for the gh-pages branch
# Optional: Configure user for commits
# user_name: 'github-actions[bot]'
# user_email: 'github-actions[bot]@users.noreply.github.com'
# Optional: Commit message
# commit_message: ${{ github.event.head_commit.message }}
path: docs/_build/html

deploy:
needs: build-docs
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
Loading