Skip to content

Commit bfc76f5

Browse files
committed
update deploy workflow
1 parent 0d822f0 commit bfc76f5

File tree

1 file changed

+22
-13
lines changed

1 file changed

+22
-13
lines changed

.github/workflows/jekyll-gh-pages.yml renamed to .github/workflows/build-and-deploy.yml

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1-
# Sample workflow for building and deploying a Jekyll site to GitHub Pages
2-
name: Deploy Jekyll with GitHub Pages dependencies preinstalled
1+
name: Build and Deploy
32

43
on:
5-
# Runs on pushes targeting the default branch
64
push:
7-
branches: ["page"]
5+
branches: [ page ]
6+
pull_request:
7+
branches: [ page ]
88

9-
# Allows you to run this workflow manually from the Actions tab
10-
workflow_dispatch:
119

1210
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
1311
permissions:
@@ -28,15 +26,26 @@ jobs:
2826
steps:
2927
- name: Checkout
3028
uses: actions/checkout@v4
31-
- name: Setup Pages
32-
uses: actions/configure-pages@v5
33-
- name: Build with Jekyll
34-
uses: actions/jekyll-build-pages@v1
29+
30+
- name: Setup Node.js
31+
uses: actions/setup-node@v4
3532
with:
36-
source: ./
37-
destination: ./_site
33+
node-version: '18'
34+
cache: 'npm'
35+
36+
- name: Install dependencies
37+
run: npm ci
38+
39+
- name: Build
40+
run: npm run build
41+
42+
- name: Setup Pages
43+
uses: actions/configure-pages@v4
44+
3845
- name: Upload artifact
3946
uses: actions/upload-pages-artifact@v3
47+
with:
48+
path: './dist'
4049

4150
# Deployment job
4251
deploy:
@@ -48,4 +57,4 @@ jobs:
4857
steps:
4958
- name: Deploy to GitHub Pages
5059
id: deployment
51-
uses: actions/deploy-pages@v4
60+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)