Skip to content

Commit e31d0a2

Browse files
committed
Feat 배포 액션 설정
1 parent c6c2369 commit e31d0a2

File tree

2 files changed

+62
-2
lines changed

2 files changed

+62
-2
lines changed

.github/workflows/deploy.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- feature/init
7+
# 특정 파일이 변경되었을 때만 실행하도록 설정할 수도 있습니다
8+
# paths:
9+
# - docs/**
10+
# - src/**
11+
# - docusaurus.config.js
12+
# - sidebars.js
13+
14+
# 수동으로 워크플로우를 실행할 수 있도록 설정
15+
workflow_dispatch:
16+
17+
# 동시에 하나의 배포만 실행되도록 설정
18+
concurrency:
19+
group: ${{ github.workflow }}-${{ github.ref }}
20+
cancel-in-progress: true
21+
22+
permissions:
23+
contents: read
24+
pages: write
25+
id-token: write
26+
27+
jobs:
28+
build:
29+
name: Build
30+
runs-on: ubuntu-latest
31+
steps:
32+
- name: Checkout
33+
uses: actions/checkout@v3
34+
- name: Setup Node
35+
uses: actions/setup-node@v3
36+
with:
37+
node-version: 18
38+
cache: npm
39+
- name: Setup Pages
40+
uses: actions/configure-pages@v3
41+
- name: Install dependencies
42+
run: npm ci
43+
- name: Build website
44+
run: npm run build
45+
- name: Upload artifact
46+
uses: actions/upload-pages-artifact@v2
47+
with:
48+
path: build
49+
50+
deploy:
51+
name: Deploy
52+
environment:
53+
name: github-pages
54+
url: ${{ steps.deployment.outputs.page_url }}
55+
runs-on: ubuntu-latest
56+
needs: build
57+
steps:
58+
- name: Deploy to GitHub Pages
59+
id: deployment
60+
uses: actions/deploy-pages@v2

docusaurus.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ const config = {
1212
favicon: 'img/favicon.ico',
1313

1414
// Set the production url of your site here
15-
url: 'https://your-docusaurus-site.example.com',
15+
url: 'https://laravel.chanhyung.kim',
1616
// Set the /<baseUrl>/ pathname under which your site is served
1717
// For GitHub pages deployment, it is often '/<projectName>/'
18-
baseUrl: '/',
18+
baseUrl: '/laravel-docs-web/',
1919

2020
// GitHub pages deployment config.
2121
// If you aren't using GitHub pages, you don't need these.

0 commit comments

Comments
 (0)