-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #58 from KUIT-Space/gh-page
Create github_pages.yml
- Loading branch information
Showing
3 changed files
with
66 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
# 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 | ||
|
||
# env ํ์ผ ์์ฑ ํ backend url ๋ฃ์ด์ฃผ๊ธฐ | ||
- name: Generate env file | ||
run: | | ||
touch .env | ||
echo "VITE_API_BACK_URL=$VITE_API_BACK_URL" >> .env | ||
env: | ||
VITE_API_BACK_URL: ${{ secrets.VITE_API_BACK_URL }} | ||
|
||
- name: Build | ||
run: npm run build | ||
|
||
- name: Setup Pages | ||
uses: actions/configure-pages@v4 | ||
|
||
- name: Upload artifact | ||
uses: actions/[email protected] | ||
with: | ||
# dist ๋๋ ํฐ๋ฆฌ ์ ๋ก๋ | ||
path: './dist' | ||
|
||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters