ci(docs): add CI workflow to test docs-site yarn install

This commit is contained in:
bd_ 2023-11-09 18:12:55 +09:00
parent 1a881e1e46
commit 178d60a46d

View File

@ -0,0 +1,36 @@
name: Test docs-site yarn installation
on:
pull_request:
jobs:
build-docs:
name: Build documentation site
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v4
with:
node-version: 18
- uses: actions/checkout@v4
- name: Setup yarn 2.0
run: |
corepack enable
corepack prepare yarn@stable --activate
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(cd docs-site~; yarn config get cacheFolder)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-site-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-site-
- name: Build CF site
run: |
cd docs-site~
yarn install --immutable