cicd: set node #7
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
name: Deploy to GitHub Pages | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout 코드 | |
uses: actions/checkout@v2 | |
- name: Node.js 설치 | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '18.18.2' | |
- name: 의존성 설치 | |
run: | | |
cd ./demo | |
npm install | |
- name: 빌드 | |
run: | | |
cd ./demo | |
npm run build | |
- name: gh-pages 브랜치로 배포 | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
publish_dir: ./demo/build | |
publish_branch: gh-pages |