Skip to content

Commit a3eb4b0

Browse files
authored
Actions: Add action to publish to GitHub Pages
1 parent afd4a7d commit a3eb4b0

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

.github/workflows/publish-site.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Via: https://github.com/SamStephens/nanoc-build-pages
2+
name: Build and deploy to Github pages
3+
4+
permissions:
5+
contents: read
6+
pages: write
7+
id-token: write
8+
9+
on:
10+
push:
11+
branches:
12+
- master
13+
14+
# Workflow with two jobs: "Build" then "Deploy"
15+
jobs:
16+
build:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: 'Checkout'
20+
uses: actions/checkout@v3
21+
with:
22+
submodules: recursive
23+
- name: 'Build page with Nanoc'
24+
uses: SamStephens/nanoc-build-pages@v2
25+
with:
26+
source: ./
27+
- name: 'Upload artifact'
28+
uses: actions/upload-pages-artifact@v1
29+
with:
30+
path: ./output
31+
32+
deploy:
33+
needs: build
34+
runs-on: ubuntu-latest
35+
environment:
36+
name: github-pages
37+
url: ${{ steps.deployment.outputs.page_url }}
38+
steps:
39+
- name: 'Deploy to GitHub Pages'
40+
id: deployment
41+
uses: actions/deploy-pages@v1

0 commit comments

Comments
 (0)