From 4c7673475d975f7a82994abc4345c1f738d15b3c Mon Sep 17 00:00:00 2001 From: Thibaud Date: Wed, 25 Sep 2024 20:30:12 +0200 Subject: [PATCH] update git workflow --- .github/workflows/main.yml | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1a2c3f7..d791bc9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -6,8 +6,7 @@ on: permissions: contents: write jobs: - build-and-deploy: - concurrency: ci-${{ github.ref }} # Recommended if you intend to make multiple deployments in quick succession. + build: runs-on: ubuntu-latest steps: - name: Checkout 🛎️ @@ -17,7 +16,27 @@ jobs: run: | npm ci npx tsc - - name: Deploy 🚀 - uses: JamesIves/github-pages-deploy-action@v4 - with: - folder: . + - name: Upload GitHub Pages artifact + uses: actions/upload-pages-artifact@v1 + + # Deploy job + 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 + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4