From deadb69ee7853294ec1387a06509c1c8c9f00c87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Geisend=C3=B6rfer?= Date: Tue, 27 Dec 2022 15:23:57 +0100 Subject: [PATCH] try other deploy approach --- .github/workflows/gh-pages.yml | 58 ++++++++++++++++++++++------------ 1 file changed, 38 insertions(+), 20 deletions(-) diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index f00f88c..ba9f14c 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -1,26 +1,44 @@ -name: GitHub Pages +name: Deploy to GitHub Pages on: + # Runs on pushes targeting the default branch push: - branches: - - sphinx # Set a branch name to trigger deployment - pull_request: + branches: ["sphinx"] + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write + +# Allow one concurrent deployment +concurrency: + group: "pages" + cancel-in-progress: true jobs: - deploy: - runs-on: ubuntu-22.04 - permissions: - contents: write - concurrency: - group: ${{ github.workflow }}-${{ github.ref }} + # Build job + build: + runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: Deploy - uses: peaceiris/actions-gh-pages@v3 - # If you're changing the branch from main, - # also change the `main` in `refs/heads/main` - # below accordingly. - if: ${{ github.ref == 'refs/heads/sphinx' }} - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./test + - name: Checkout + uses: actions/checkout@v3 + - name: Setup Pages + uses: actions/configure-pages@v2 + - run: "mkdir -p _site && echo foo > _site/index.html" + - name: Upload artifact + uses: actions/upload-pages-artifact@v1 + + # 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@v1