Skip to content

chore(core): add ci workflows #2

chore(core): add ci workflows

chore(core): add ci workflows #2

name: CI (Build and Deploy)
on:
pull_request:
types:
- opened
- synchronize
paths-ignore:
- "README.md"
push:
branches:
- main
paths-ignore:
- "README.md"
jobs:
build:
name: Build
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
- uses: actions/setup-node@v3
with:
node-version: "18"
cache: "pnpm"
- run: pnpm install --frozen-lockfile
- run: pnpm run build
deploy:
name: Deploy
needs: build
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
permissions:
contents: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build