Skip to content

Commit

Permalink
Merge pull request #323 from jakemulley/fix-ci
Browse files Browse the repository at this point in the history
Improve continuous deployment by using direct actions/ dependencies
  • Loading branch information
jakemulley authored Jan 27, 2024
2 parents 8b1cc39 + 0bae108 commit 743fb88
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 743fb88

Please sign in to comment.