modular-avatar/.github/workflows/test-docs-site-build.yml
dependabot[bot] 1b6d06b033
chore(deps): bump actions/cache from 3 to 4 in /.github/workflows (#628)
Bumps [actions/cache](https://github.com/actions/cache) from 3 to 4.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-28 20:13:49 +09:00

51 lines
1.3 KiB
YAML

name: Test docs-site yarn installation
on:
push:
branches:
- ci
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
yarn --version
#- 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@v4
if: false
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_ENABLE_HARDENED_MODE=0 YARN_ENABLE_IMMUTABLE_INSTALLS=false yarn install
- name: Display diff on failure
if: ${{ failure() }}
run: |
cd docs-site~
env
YARN_ENABLE_IMMUTABLE_INSTALLS=false yarn install && git diff