Skip to content

Commit

Permalink
Improve continuous deployment by using direct actions/ dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
jakemulley committed Jan 27, 2024
1 parent 8b1cc39 commit 0bae108
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 0bae108

Please sign in to comment.