Skip to content

修正

修正 #21

Workflow file for this run

name: deploy
on:
push:
branches: ['master']
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: 'pages'
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 20
cache: 'pnpm'
- name: Setup pnpm
uses: pnpm/action-setup@v3
with:
version: 9.0.6
package_json_file: "../../package.json"
- name: install
run: pnpm install
- name: pnpm build
run: pnpm build
# GIthubページは https://USERNAME.github.io/REPOSITORY_NAME/
# となるので、envを追加してviteのベースパスを変えるように設定します。
env:
GITHUB_PAGES: true
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: ./dist
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1