Skip to content

Commit

Permalink
Fix/documentation workflow (#314)
Browse files Browse the repository at this point in the history
* test documentation workflow

* test 1

* updated version
  • Loading branch information
rugeli authored Feb 24, 2025
1 parent e436b1f commit 82c306e
Showing 1 changed file with 30 additions and 6 deletions.
36 changes: 30 additions & 6 deletions .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ on:
- main
workflow_dispatch:

# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
contents: read
pages: write
id-token: write

jobs:
docs:
if: ${{ !contains(github.event.head_commit.message, 'Bump version') }}
Expand All @@ -14,16 +20,34 @@ jobs:
- uses: actions/checkout@v4.2.2
with:
persist-credentials: false

- uses: ./.github/actions/dependencies

- name: Setup Pages
uses: actions/configure-pages@v4

- name: Generate Docs
run: |
pdm run make gen-docs
touch docs/_build/html/.nojekyll
- name: Publish Docs
uses: JamesIves/github-pages-deploy-action@v4.6.8
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BASE_BRANCH: main # The branch the action should deploy from.
BRANCH: gh-pages # The branch the action should deploy to.
FOLDER: docs/_build/html/ # The folder the action should deploy.
path: docs/_build/html/

deploy:
needs: docs
runs-on: ubuntu-latest

# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

# Specify runner + deployment step
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

0 comments on commit 82c306e

Please sign in to comment.