diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index f9cc53f..fb1af73 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -2,8 +2,22 @@ name: Deploy on: push: - branches: - - main + branches: ["main"] + + # 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 only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. +# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. +concurrency: + group: "pages" + cancel-in-progress: false jobs: build: @@ -30,21 +44,11 @@ jobs: path: book/ deploy: - # Add a dependency to the build job - needs: build - - # Grant GITHUB_TOKEN the permissions required to make a Pages deployment - permissions: - pages: write # to deploy to Pages - id-token: write # to verify the deployment originates from an appropriate source - - # Deploy to the github-pages environment environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }} - - # Specify runner + deployment step runs-on: ubuntu-latest + needs: build steps: - name: Deploy to GitHub Pages id: deployment diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index c81b548..3ffd1ec 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -22,3 +22,9 @@ jobs: - name: Build 🔨 run: | ./wrapper.sh build + + - name: Upload static files as artifact + id: deployment + uses: actions/upload-pages-artifact@v3 + with: + path: book/