Skip to content

Commit bef6a06

Browse files
cwhite911Corey White
andauthored
CI: Updated gh pages action deployment (#21)
While publishing the pages from a separate branch is available and marked as classic, use the GitHub Actions upload to Pages directly instead of modifying the branch. --------- Co-authored-by: Corey White <[email protected]>
1 parent fb23422 commit bef6a06

File tree

1 file changed

+33
-17
lines changed

1 file changed

+33
-17
lines changed

.github/workflows/publish.yml

Lines changed: 33 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,38 @@ on:
66
name: Quarto Publish
77

88
jobs:
9-
build-deploy:
10-
runs-on: ubuntu-latest
11-
permissions:
12-
contents: write
13-
steps:
14-
- name: Check out repository
15-
uses: actions/checkout@v4
9+
build:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write
13+
steps:
14+
- name: Check out repository
15+
uses: actions/checkout@v4
16+
17+
- name: Set up Quarto
18+
uses: quarto-dev/quarto-actions/setup@v2
19+
with:
20+
version: '1.5.57' # Specify the desired version
21+
22+
- name: Render Quarto Project
23+
uses: quarto-dev/quarto-actions/render@v2
1624

17-
- name: Set up Quarto
18-
uses: quarto-dev/quarto-actions/setup@v2
19-
with:
20-
version: '1.5.57' # Specify the desired version
25+
- name: Upload static files as artifact
26+
uses: actions/upload-pages-artifact@v3
27+
with:
28+
path: docs/
2129

22-
- name: Render and Publish
23-
uses: quarto-dev/quarto-actions/publish@v2
24-
with:
25-
target: gh-pages
26-
env:
27-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30+
# Deployment job
31+
deploy:
32+
permissions:
33+
id-token: write
34+
pages: write
35+
environment:
36+
name: github-pages
37+
url: ${{ steps.deployment.outputs.page_url }}
38+
runs-on: ubuntu-latest
39+
needs: build
40+
steps:
41+
- name: Deploy to GitHub Pages
42+
id: deployment
43+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)