Skip to content

Commit

Permalink
Split out publish & build steps and correctly set environment
Browse files Browse the repository at this point in the history
  • Loading branch information
dgtized committed Oct 16, 2024
1 parent 184e3ea commit 1026858
Showing 1 changed file with 26 additions and 10 deletions.
36 changes: 26 additions & 10 deletions .github/workflows/continuous-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@ on:
branches: [ main ]
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: true
Expand All @@ -21,6 +16,9 @@ jobs:
name: Test
runs-on: ubuntu-latest

permissions:
contents: read

steps:
- name: Checkout
uses: actions/[email protected]
Expand Down Expand Up @@ -58,11 +56,14 @@ jobs:
- name: Test
run: bin/kaocha unit-cljc

publish:
name: Publish
build:
name: Build
needs: test
runs-on: ubuntu-latest

permissions:
contents: read

steps:
- name: Checkout
uses: actions/[email protected]
Expand Down Expand Up @@ -94,17 +95,32 @@ jobs:
- name: Install dependencies
run: npm ci

- name: Setup Pages
uses: actions/configure-pages@v5

- name: Build
run: bb build

- name: Upload artifact
id: deployment
uses: actions/upload-pages-artifact@v3
with:
path: 'static-site'

publish:
name: Publish
needs: build
runs-on: ubuntu-latest

permissions:
pages: write
id-token: write

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

steps:
- name: Configure Pages
uses: actions/configure-pages@v5

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

0 comments on commit 1026858

Please sign in to comment.