diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml new file mode 100644 index 0000000..20325f9 --- /dev/null +++ b/.github/workflows/documentation.yml @@ -0,0 +1,57 @@ +name: Documentation + +on: + push: + branches: + - main + pull_request: + branches: + - main + workflow_dispatch: + +permissions: + contents: read + +concurrency: + group: documentation + cancel-in-progress: false + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + + - uses: julia-actions/setup-julia@latest + with: + version: "1" + + - uses: julia-actions/cache@v3 + + - name: Instantiate docs environment + run: julia --project=docs -e 'using Pkg; Pkg.instantiate()' + + - name: Build documentation + run: julia --project=docs docs/make.jl + + - if: github.event_name == 'push' && github.ref == 'refs/heads/main' + uses: actions/configure-pages@v5 + + - if: github.event_name == 'push' && github.ref == 'refs/heads/main' + uses: actions/upload-pages-artifact@v4 + with: + path: docs/build + + deploy: + if: github.event_name == 'push' && github.ref == 'refs/heads/main' + needs: build + permissions: + pages: write + id-token: write + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - id: deployment + uses: actions/deploy-pages@v5 \ No newline at end of file