Skip to content

Commit

Permalink
ci: build and upload docs to github pages
Browse files Browse the repository at this point in the history
issue #33
  • Loading branch information
cthulhu-irl committed Sep 26, 2023
1 parent 480cf27 commit d274b89
Showing 1 changed file with 28 additions and 1 deletion.
29 changes: 28 additions & 1 deletion .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
branches: [ "main" ]

jobs:
build-and-test:
build-test-docs:
strategy:
fail-fast: true
matrix:
Expand Down Expand Up @@ -68,3 +68,30 @@ jobs:
files: build/${{matrix.config.preset}}/coverage/coverage.xml
fail_ci_if_error: true
functionalities: fix

- name: Build Docs
run: |
cmake --build --preset ${{matrix.config.preset}} --target docs
mv build/${{matrix.config.preset}}/docs/sphinx _site
- name: Upload Pages Artifacts
uses: actions/upload-pages-artifact@v2

deploy-docs:
if: success() && github.ref == 'refs/heads/33-add-documentation-generator-to-build' # TODO on push to branch main
needs: build-test-docs
runs-on: ubuntu-latest

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 }}

steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2

0 comments on commit d274b89

Please sign in to comment.