From 494fab09ba6295ced7a066eb2a19a73a6c929694 Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Sat, 25 Feb 2023 17:49:57 -0700 Subject: [PATCH] ci: docs: deploy directly, rather than via gh_pages branch --- .github/workflows/pages.yml | 38 +++++++++++++++++++++++++++---------- 1 file changed, 28 insertions(+), 10 deletions(-) diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index 1821b77ea..5f029fad9 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -14,8 +14,21 @@ on: schedule: - cron: "50 * * * *" + # 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 + +concurrency: + group: "pages" + cancel-in-progress: true + jobs: - publish: + build: runs-on: ubuntu-latest steps: - name: Checkout @@ -56,13 +69,18 @@ jobs: run: | source $HOME/.cargo/env ./ci/build-docs.sh - - name: Deploy - if: success() - uses: crazy-max/ghaction-github-pages@v3 + - name: Upload artifact + uses: actions/upload-pages-artifact@v1 with: - target_branch: gh-pages - build_dir: gh_pages/html - keep_history: true - allow_empty_commit: false - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + path: gh_pages/html + + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + needs: build + steps: + - name: Deploy + id: deployment + uses: actions/deploy-pages@v1