Skip to content

Commit

Permalink
Deploy pages from workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
neiljdo committed Aug 29, 2024
1 parent 90e535a commit 456a426
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,11 @@ on:
- released

# We need the following permission to upload the documentation as a release asset.
# and to be able to deploy to GH pages (https://docs.github.com/en/pages/getting-started-with-github-pages/using-custom-workflows-with-github-pages#deploying-github-pages-artifacts)
permissions:
contents: write
pages: write
id-token: write

env:
WORKFLOWS_DIR: .github/workflows
Expand All @@ -25,6 +28,9 @@ jobs:
docs:
name: Build and deploy documentation
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -45,6 +51,18 @@ jobs:
args: '-v -DPLANTUML_LIMIT_SIZE=8192 -tpng ${{ env.DOCS_DIR }}/puml/*.puml -o img'
- name: Build documentation
run: uv run ./build-docs.sh
- name: Setup Pages
id: pages
uses: actions/configure-pages@v3
- name: Upload Artifact
uses: actions/upload-pages-artifact@v2
with:
# upload build output
path: ${{ env.DOCS_BUILD_DIR }}
- name: Deploy artifact
id: deployment
uses: actions/deploy-pages@v1

# - name: Deploy documentation
# if: ${{ github.event_name == 'push' && (github.ref_name == 'main' || github.ref_name == 'release') }}
# uses: s0/git-publish-subdir-action@develop
Expand Down

0 comments on commit 456a426

Please sign in to comment.