From ef2dc8360d5d752c7305cbbbb7178554ee8fc7be Mon Sep 17 00:00:00 2001 From: Jan Philip Bernius Date: Fri, 16 Dec 2022 15:25:12 +0100 Subject: [PATCH] GitHub Pages: Use GitHub Actions source --- .github/workflows/docs.yml | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 6a3572b826b7..ce9a8ab396cf 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -17,6 +17,12 @@ on: types: - created +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write + jobs: docs: @@ -27,17 +33,19 @@ jobs: with: docs-folder: "docs/" build-command: make html dirhtml - - uses: actions/upload-artifact@v3 + - uses: actions/upload-pages-artifact@v1 with: - name: Documentation path: docs/_build/html/ - - - uses: peaceiris/actions-gh-pages@v3 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: docs/_build/dirhtml/ - user_name: 'artemis-bot' - user_email: 'artemis-bot@users.noreply.github.com' - full_commit_message: ${{ github.event.head_commit.message }} - cname: docs.artemis.cit.tum.de - if: github.ref == 'refs/heads/develop' + + # Deployment job + deploy: + if: github.ref == 'refs/heads/develop' + environment: + name: github-pages + url: docs.artemis.cit.tum.de + runs-on: ubuntu-latest + needs: docs + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v1