From 0bae108cd111007c65747517992de2c544e66f80 Mon Sep 17 00:00:00 2001 From: jakemulley Date: Sat, 27 Jan 2024 14:25:05 +0000 Subject: [PATCH] Improve continuous deployment by using direct actions/ dependencies --- .github/workflows/deploy.yml | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) 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