diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 45ac4d4..13ff911 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -13,25 +13,33 @@ permissions: id-token: write concurrency: - group: "pages" - cancel-in-progress: true + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: withastro/action@v1 + - uses: actions/setup-node@v4 with: node-version: 20 + cache: "npm" + - uses: actions/configure-pages@v4 + id: pages + - run: npm ci - run: npm run ci + - run: npm run build + - uses: actions/upload-pages-artifact@v3 + with: + path: ./dist deploy: + runs-on: ubuntu-latest if: ${{ github.ref == 'refs/heads/main' }} needs: build - runs-on: ubuntu-latest environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }} steps: - - uses: actions/deploy-pages@v3 + - uses: actions/deploy-pages@v4 id: deployment