From cc0b715ba11107242875167a7f18f4a25da116bd Mon Sep 17 00:00:00 2001 From: Mark Stephenson Date: Fri, 5 Jan 2024 00:03:04 -0800 Subject: [PATCH] pages --- .github/workflows/documentation.yml | 41 +++++++++++++++++++++-------- 1 file changed, 30 insertions(+), 11 deletions(-) diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 4b3026d5..aa43c338 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -1,12 +1,16 @@ -name: Build Documentation +name: Documentation on: [pull_request] +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages permissions: - contents: write + contents: read + pages: write + id-token: write + jobs: - docs: + build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -24,12 +28,27 @@ jobs: run: | cd docs make html - # - name: Deploy to GitHub Pages - # uses: peaceiris/actions-gh-pages@v3 - # # if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} - # with: - # publish_branch: gh-pages - # github_token: ${{ secrets.GITHUB_TOKEN }} - # publish_dir: _build/ - # force_orphan: true + cd .. + - name: Setup Pages + uses: actions/configure-pages@v4 + - name: Build with Jekyll + uses: actions/jekyll-build-pages@v1 + with: + source: ./docs/build/html + destination: ./_site + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + + # Deployment job + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + needs: build + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 +