Skip to content

Commit 0fff2a7

Browse files
authored
Deploy GitHub Actions artifacts to Pages (#5)
1 parent 81760f5 commit 0fff2a7

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

.github/workflows/build.yml

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ on:
33
push:
44
branches:
55
- master
6+
permissions:
7+
contents: read
8+
pages: write
9+
id-token: write
10+
611
jobs:
712
build:
813
runs-on: ubuntu-latest
@@ -14,4 +19,20 @@ jobs:
1419
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
1520
1621
- name: Build and deploy
17-
run: nix develop --command mkdocs gh-deploy --force
22+
run: nix develop --command mkdocs build --site-dir public
23+
24+
- name: Upload artifact
25+
uses: actions/upload-pages-artifact@v1
26+
with:
27+
path: public
28+
29+
deploy:
30+
environment:
31+
name: github-pages
32+
url: ${{ steps.deployment.outputs.page_url }}
33+
runs-on: ubuntu-latest
34+
needs: build
35+
steps:
36+
- name: Deploy to GitHub Pages
37+
id: deployment
38+
uses: actions/deploy-pages@v1

0 commit comments

Comments
 (0)