Skip to content

Workflow file for this run

# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: build.js CI
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "gh-pages" ]
#on:
# push:
# branches:
# - main
# # 트리거, 경로 등을 추가로 정의하려면 gh action 문서를 참고하세요.
# # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on
jobs:
deploy:
name: Deploy to GitHub Pages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3
with:
node-version: 16.x
cache: npm
- name: Install dependencies
run: npm install --frozen-lockfile
- name: Build website
run: npm run build
# 깃허브 페이지에 배포하기 위한 일반적인 액션
# Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
# `gh-pages` 브랜치에 게시할 산출물 빌드
publish_dir: ./build
# 다음 라인은 공식적으로 커밋 권한을 할당합니다.
# `gh-pages` 브랜치에 배포하기 위한 GH-Actions 봇
# https://github.com/actions/checkout/issues/13#issuecomment-724415212
# 두 개 필드를 설정하지 않은 경우 GH-Actions 봇이 기본 설정됩니다.
# 자신의 자격증명으로 교체할 수 있습니다.
user_name: github-actions[bot]
user_email: 41898282+github-actions[bot]@users.noreply.github.com