Skip to content

Commit

Permalink
split build and publish steps
Browse files Browse the repository at this point in the history
  • Loading branch information
dgtized committed Oct 16, 2024
1 parent cbe71f7 commit 92bd877
Showing 1 changed file with 22 additions and 10 deletions.
32 changes: 22 additions & 10 deletions .github/workflows/continuous-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@ on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

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

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

permissions:
contents: read

steps:
- uses: actions/checkout@v4

Expand All @@ -48,14 +46,13 @@ jobs:
- name: Lint
run: clojure -M:clj-kondo --lint src

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

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

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -86,10 +83,25 @@ jobs:
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: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

0 comments on commit 92bd877

Please sign in to comment.