Skip to content

Merge pull request #8 from calloc134/docs/20230907-docs #11

Merge pull request #8 from calloc134/docs/20230907-docs

Merge pull request #8 from calloc134/docs/20230907-docs #11

Workflow file for this run

# Sample workflow for building and deploying a Docusaurus site to GitHub Pages
name: Deploy Docusaurus with GitHub Pages dependencies preinstalled
on:
# masterブランチへのpushに対応する
push:
branches: ["master"]
# プルリクエストでのCIに対応する
pull_request:
types: [opened, synchronize]
# 手動での実行に対応する
workflow_dispatch:
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 15
# 実行ステップ
steps:
- uses: actions/checkout@v2
- uses: pnpm/[email protected]
with:
version: 8.6.3
- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: 18
cache: "pnpm"
cache-dependency-path: "docs/pnpm-lock.yaml"
# 依存関係のインストール
- name: install dependencies
run: pnpm install --frozen-lockfile
working-directory: docs
- name: Build
run: |
pnpm run build
working-directory: docs
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: docs/build
# Deployment job
deploy:
# masterブランチのときのみ実行する
if : github.ref == 'refs/heads/master'
# 必要な権限を付与する
permissions:
pages: write # to deploy to Pages
id-token: write
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@v2