Skip to content

Commit 2739c33

Browse files
Update jekyll-gh-pages.yml
1 parent 63288f2 commit 2739c33

File tree

1 file changed

+31
-23
lines changed

1 file changed

+31
-23
lines changed

.github/workflows/jekyll-gh-pages.yml

Lines changed: 31 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -6,45 +6,53 @@ on:
66
- main
77

88
permissions:
9-
contents: write
10-
pages: write
11-
id-token: write
9+
contents: write
10+
pages: write
11+
id-token: write
1212

1313
jobs:
14-
github-pages:
14+
build:
15+
name: Build site
1516
runs-on: ubuntu-latest
16-
1717
steps:
18-
# Step 1: Check out the code
19-
- name: Checkout code
20-
uses: actions/checkout@v3
21-
22-
# Step 2: Setup Ruby environment
18+
- name: Checkout repository
19+
uses: actions/checkout@v2
20+
2321
- name: Setup Ruby
2422
uses: ruby/setup-ruby@v1
2523
with:
2624
ruby-version: 3.1
2725
bundler-cache: true
28-
29-
# Step 3: Setup Node.js environment
26+
3027
- name: Setup Node.js
31-
uses: actions/setup-node@v3
28+
uses: actions/setup-node@v2
3229
with:
3330
node-version: '18'
34-
35-
# Step 4: Install dependencies
31+
3632
- name: Install dependencies
3733
run: npm install
38-
39-
# Step 5: Build the Jekyll site
40-
- name: Build Jekyll site
34+
35+
- name: Build the site with Jekyll
4136
uses: limjh16/jekyll-action-ts@v2
4237
with:
4338
enable_cache: true
39+
40+
- name: Upload artifact
41+
uses: actions/upload-pages-artifact@v3
42+
with:
43+
path: ./_site
4444

45-
# Step 6: Deploy to GitHub Pages
45+
deploy:
46+
name: Deploy to GitHub Pages
47+
runs-on: ubuntu-latest
48+
needs: build
49+
environment:
50+
name: github-pages
51+
url: ${{ steps.deployment.outputs.page_url }}
52+
permissions:
53+
pages: write
54+
id-token: write
55+
steps:
4656
- name: Deploy to GitHub Pages
47-
uses: peaceiris/actions-gh-pages@v4
48-
with:
49-
github_token: ${{ secrets.GITHUB_TOKEN }}
50-
publish_dir: ./_site
57+
id: deployment
58+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)