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