From 38ca585401d6892b6004467c5679e1d9dbb65b7b Mon Sep 17 00:00:00 2001 From: uche789 <3889297+uche789@users.noreply.github.com> Date: Fri, 8 Nov 2024 10:04:59 +0100 Subject: [PATCH] Update deploy.yml --- .github/workflows/deploy.yml | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 450e66bf..d73bf234 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -13,13 +13,17 @@ on: # Allows you to run this workflow manually from the Actions tab workflow_dispatch: +# Allow one concurrent deployment +concurrency: + group: "pages" + cancel-in-progress: true + # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: # This workflow contains a single job called "build" build: # The type of runner that the job will run on runs-on: ubuntu-latest - environment: github-pages permissions: pages: write # to deploy to Pages @@ -40,10 +44,30 @@ jobs: run: npm install -g yarn - name: Install and build + env: + VITE_APP_SPACE_ID: ${{ vars.VITE_APP_SPACE_ID }} + VITE_APP_ACCESS_TOKEN: ${{ vars.VITE_APP_ACCESS_TOKEN }} run: | yarn yarn build + + - name: Setup Pages + uses: actions/configure-pages@v4 + + - name: Upload artifact + uses: actions/upload-pages-artifact@v4 + with: + # Upload dist folder + path: "./build" + # This workflow contains a single job called "build" + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + needs: build + steps: - name: Deploy 🚀 uses: actions/deploy-pages@v4 with: