From 46e139f8441404686b4aabe585c8ca64221f9d77 Mon Sep 17 00:00:00 2001 From: Willem Olding Date: Mon, 15 Apr 2024 19:21:11 +1000 Subject: [PATCH] redo pages deployment --- .github/workflows/pages.yml | 65 ++++++++++++++++++++++++++----------- 1 file changed, 46 insertions(+), 19 deletions(-) diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index ef49aa4..7aeae00 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -1,9 +1,9 @@ name: Deploy bridge Github Pages -on: - workflow_dispatch: - release: - types: [published] +on: + workflow_dispatch: + release: + types: [published] permissions: contents: write @@ -11,24 +11,51 @@ permissions: defaults: run: working-directory: bridge-frontend - jobs: - build-and-deploy: - concurrency: ci-${{ github.ref }} # Recommended if you intend to make multiple deployments in quick succession. + deploy: + permissions: + contents: read + pages: write + id-token: write runs-on: ubuntu-latest + needs: jekyll-build + environment: + name: github-pages + url: ${{steps.deployment.outputs.page_url}} steps: - - name: Checkout 🛎️ - uses: actions/checkout@v4 + - name: Deploy artifact + id: deployment + uses: actions/deploy-pages@v1 - - name: Install and Build 🔧 # This example project is built using npm and outputs the result to the 'build' folder. Replace with the commands required to build your project, or remove this step entirely if your site is pre-built. - run: | - corepack enable - yarn - yarn codegen - yarn build - - name: Deploy 🚀 - uses: JamesIves/github-pages-deploy-action@v4 - with: - folder: bridge-frontend/build # The folder the action should deploy. + jobs: + # Build job + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup Pages + id: pages + uses: actions/configure-pages@v3 + - name: Build with Yarn + - run: | + corepack enable + yarn + yarn codegen + yarn build + - name: Upload artifact + uses: actions/upload-pages-artifact@v2 + + # Deployment job + deploy: + environment: + name: github-pages + url: ${{steps.deployment.outputs.page_url}} + runs-on: ubuntu-latest + needs: build + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v2 \ No newline at end of file