Skip to content

Commit bc7a84f

Browse files
committed
Github action: deploy pages
1 parent e39a90c commit bc7a84f

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

.github/workflows/node.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,20 @@ on:
44
push:
55
pull_request:
66

7+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
14+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
15+
concurrency:
16+
group: "pages"
17+
cancel-in-progress: false
18+
719
jobs:
20+
# Build
821
build:
922
runs-on: ubuntu-latest
1023
steps:
@@ -22,3 +35,37 @@ jobs:
2235
with:
2336
name: build
2437
path: build
38+
39+
# Build pages
40+
build-pages:
41+
needs: [build]
42+
runs-on: ubuntu-latest
43+
steps:
44+
- name: Checkout
45+
uses: actions/checkout@v4
46+
- name: Download build artifact
47+
uses: actions/download-artifact@v4
48+
with:
49+
name: build
50+
path: build
51+
- name: Setup Pages
52+
uses: actions/configure-pages@v5
53+
- name: Build with Jekyll
54+
uses: actions/jekyll-build-pages@v1
55+
with:
56+
source: ./
57+
destination: ./_site
58+
- name: Upload pages artifact
59+
uses: actions/upload-pages-artifact@v3
60+
61+
# Deploy pages
62+
deploy-pages:
63+
needs: [build-pages]
64+
runs-on: ubuntu-latest
65+
environment:
66+
name: github-pages
67+
url: ${{ steps.deployment.outputs.page_url }}
68+
steps:
69+
- name: Deploy to GitHub Pages
70+
id: deployment
71+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)