Skip to content

Commit

Permalink
Update GitHub Actions workflow to build and deploy documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
jpsferreira committed Mar 29, 2024
1 parent 535d5b7 commit 4405ae3
Showing 1 changed file with 31 additions and 5 deletions.
36 changes: 31 additions & 5 deletions .github/workflows/on-release-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,42 @@ jobs:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
RELEASE_VERSION: ${{ steps.vars.outputs.tag }}

deploy-docs:
build-and-upload-docs:
needs: publish
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v4

- name: Set up the environment
uses: ./.github/actions/setup-poetry-env

- name: Deploy documentation
run: poetry run mkdocs gh-deploy --force
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Build documentation
run: poetry run mkdocs build --clean

- name: Upload Pages artifact for deployment
uses: actions/upload-artifact@v3
with:
name: pages
path: site

deploy-docs:
needs: build-and-upload-docs
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source

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

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

0 comments on commit 4405ae3

Please sign in to comment.