From 5f8fe62526972e282136dcfd6fc53ac79c41460a Mon Sep 17 00:00:00 2001 From: Dario Digregorio Date: Tue, 28 May 2024 13:34:32 +0200 Subject: [PATCH] chore: Update permissions, concurrency, and deployment configuration in deploy_deck.yaml workflow --- .github/workflows/deploy_deck.yaml | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/.github/workflows/deploy_deck.yaml b/.github/workflows/deploy_deck.yaml index 38c43c9..79f38cc 100644 --- a/.github/workflows/deploy_deck.yaml +++ b/.github/workflows/deploy_deck.yaml @@ -4,14 +4,21 @@ on: push: branches: - main + workflow_dispatch: + jobs: build-and-deploy: runs-on: ubuntu-latest permissions: - contents: write + contents: read + pages: write + id-token: write concurrency: group: ${{ github.workflow }}-${{ github.ref }} + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} steps: - name: Checkout repository uses: actions/checkout@v4 @@ -23,8 +30,13 @@ jobs: run: | cd deck flutter build web --release - - name: Deploy to GitHub Pages - uses: peaceiris/actions-gh-pages@v3 + - name: Setup Pages + uses: actions/configure-pages@v5 + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: deck/build/web \ No newline at end of file + # Upload entire repository + path: 'deck/build/web' + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 \ No newline at end of file