Skip to content

Commit 7d8463a

Browse files
committed
docs: GitHub Actions 워크플로우 수정 및 배포 단계 추가
1 parent 16751be commit 7d8463a

File tree

1 file changed

+30
-16
lines changed

1 file changed

+30
-16
lines changed

.github/workflows/deploy.yml

Lines changed: 30 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,47 @@
1-
name: Deploy Docusaurus to GitHub Pages
2-
3-
env:
4-
NODE_OPTIONS: --max_old_space_size=4096
1+
name: Deploy to GitHub Pages
52

63
on:
74
push:
85
branches:
96
- main
7+
workflow_dispatch:
108

119
jobs:
12-
deploy:
10+
build:
11+
name: Build Docusaurus
1312
runs-on: ubuntu-latest
1413
steps:
15-
- name: Checkout code
16-
uses: actions/checkout@v4
17-
18-
- name: Setup Node.js
19-
uses: actions/setup-node@v4
14+
- uses: actions/checkout@v4
15+
with:
16+
fetch-depth: 0
17+
- uses: actions/setup-node@v4
2018
with:
21-
node-version: 18
19+
node-version: 18.x
20+
cache: npm
2221

2322
- name: Install dependencies
2423
run: npm ci
25-
2624
- name: Build website
2725
run: npm run build
2826

29-
- name: Deploy to GitHub Pages
30-
uses: peaceiris/actions-gh-pages@v4
27+
- name: Upload Build Artifact
28+
uses: actions/upload-pages-artifact@v3
3129
with:
32-
github_token: ${{ secrets.GITHUB_TOKEN }}
33-
publish_dir: ./build
30+
path: build
31+
32+
deploy:
33+
name: Deploy to GitHub Pages
34+
needs: build
35+
36+
permissions:
37+
pages: write
38+
id-token: write
39+
40+
environment:
41+
name: github-pages
42+
43+
runs-on: ubuntu-latest
44+
steps:
45+
- name: Deploy to GitHub Pages
46+
id: deployment
47+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)