Skip to content

Commit 17e03c3

Browse files
authored
Merge pull request #118 from frontend-opensource-project/URH-115-deploy-github-pages
[URH-115] docs 페이지 github pages로 변경
2 parents 61267f7 + bd2caa8 commit 17e03c3

File tree

3 files changed

+41
-1
lines changed

3 files changed

+41
-1
lines changed

.github/workflows/deploy.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Deploy Nextra docs to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build-and-deploy:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout source code
14+
uses: actions/checkout@v3
15+
16+
- name: Setup Node.js
17+
uses: actions/setup-node@v3
18+
with:
19+
node-version: '18'
20+
21+
- name: Install dependencies
22+
run: npm install
23+
working-directory: ./docs
24+
25+
- name: Build Nextra site
26+
run: npm run build
27+
working-directory: ./docs
28+
29+
- name: Deploy to GitHub Pages
30+
uses: peaceiris/actions-gh-pages@v3
31+
with:
32+
github_token: ${{ secrets.GITHUB_TOKEN }}
33+
publish_dir: ./docs/out
34+

docs/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Ignore Next.js build output
22
.next/
3+
out/
34

45
# Logs
56
logs

docs/next.config.mjs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,9 @@ import nextra from 'nextra';
22

33
const withNextra = nextra('nextra-theme-docs', './theme.config.js');
44

5-
export default withNextra({});
5+
export default withNextra({
6+
output: 'export',
7+
images: {
8+
unoptimized: true,
9+
},
10+
});

0 commit comments

Comments
 (0)