mirror of
https://github.com/bdunderscore/modular-avatar.git
synced 2025-03-10 15:54:56 +08:00
ci(docs): add CI workflow to test docs-site yarn install
This commit is contained in:
parent
1a881e1e46
commit
178d60a46d
36
.github/workflows/test-docs-site-build.yml
vendored
Normal file
36
.github/workflows/test-docs-site-build.yml
vendored
Normal 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
|
Loading…
Reference in New Issue
Block a user