diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index f3a1b17..d9a3a54 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -5,8 +5,21 @@ on: branches: - main +# 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: build-static: + environment: + name: github-pages runs-on: [self-hosted, Linux] steps: - name: Checkout @@ -36,21 +49,19 @@ jobs: echo "::warning title=Invalid file permissions automatically fixed::$line" done - - name: Upload Pages artifact - uses: actions/upload-pages-artifact@v2 + - name: Upload artifact + uses: actions/upload-artifact@v4 with: - path: "dist/" + name: github-pages + path: dist deploy: needs: build-static - runs-on: [self-hosted, Linux] - if: github.ref == 'refs/heads/main' - permissions: - pages: write # to deploy to Pages - id-token: write # to verify the deployment originates from an appropriate source environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }} + runs-on: [self-hosted, Linux] + if: github.ref == 'refs/heads/main' steps: - name: Deploy pages id: deployment