ドクター、終わってない仕事がたくさんありますから。まだ休んじゃダメですよ。 #187
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: Build and deploy | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
paths: | |
- 'assets/**' | |
- 'build/**' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Node.js 16 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 16 | |
- name: Install dependencies | |
run: yarn install --frozen-lockfile | |
- name: Build | |
env: | |
TZ: Asia/Shanghai | |
run: yarn build | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: dist | |
deploy: | |
needs: build | |
runs-on: ubuntu-latest | |
concurrency: | |
group: 'pages' | |
cancel-in-progress: true | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |