Skip to content

Commit

Permalink
gh-pages yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Turtle-Hwan committed Jul 4, 2024
1 parent 1654d66 commit c5c130b
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/github_pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# GitHub Pages에 정적 μ½˜ν…μΈ λ₯Ό λ°°ν¬ν•˜κΈ° μœ„ν•œ κ°„λ‹¨ν•œ μ›Œν¬ν”Œλ‘œμš°
name: Deploy static content to Pages

on:
# κΈ°λ³Έ λΈŒλžœμΉ˜μ— λŒ€ν•œ ν‘Έμ‹œ 이벀트 λ°œμƒ μ‹œ μ‹€ν–‰
push:
branches: ['main']

# Actions νƒ­μ—μ„œ μˆ˜λ™μœΌλ‘œ μ›Œν¬ν”Œλ‘œμš°λ₯Ό μ‹€ν–‰ν•  수 μžˆλ„λ‘ ꡬ성
workflow_dispatch:

# GITHUB_TOKEN의 κΆŒν•œμ„ μ„€μ •ν•˜μ—¬ GitHub Pages에 배포할 수 μžˆλ„λ‘ 함
permissions:
contents: read
pages: write
id-token: write

# λ™μ‹œμ— ν•˜λ‚˜μ˜ 배포만 ν—ˆμš©ν•˜λ„λ‘ ꡬ성
concurrency:
group: 'pages'
cancel-in-progress: true

jobs:
# λ‹¨μˆœνžˆ 배포만 μˆ˜ν–‰ν•˜κΈ°μ— ν•˜λ‚˜μ˜ 작으둜만 ꡬ성
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
# dist 디렉터리 μ—…λ‘œλ“œ
path: './dist'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
3 changes: 3 additions & 0 deletions src/pages/HomePage/HomePage.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default function HomePage() {
return <h1>Home ν™”λ©΄μž…λ‹ˆλ‹€μ•„μ•„μ•„μ•„μ•„</h1>;
}
1 change: 1 addition & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ export default defineConfig({
external: ["react", "react-dom", "styled-components"],
},
},
base: "/KUIT3_Hackathon_Team5-Web/",
});

0 comments on commit c5c130b

Please sign in to comment.