From 178d60a46d9fd4f371b2d3fc2a5206293746401b Mon Sep 17 00:00:00 2001 From: bd_ Date: Thu, 9 Nov 2023 18:12:55 +0900 Subject: [PATCH] ci(docs): add CI workflow to test docs-site yarn install --- .github/workflows/test-docs-site-build.yml | 36 ++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/test-docs-site-build.yml diff --git a/.github/workflows/test-docs-site-build.yml b/.github/workflows/test-docs-site-build.yml new file mode 100644 index 00000000..e080de95 --- /dev/null +++ b/.github/workflows/test-docs-site-build.yml @@ -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