Skip to content

Commit

Permalink
chore: build doc on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
mistic100 committed Jan 3, 2024
1 parent f528852 commit c5d9053
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 8 deletions.
43 changes: 37 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,23 +29,20 @@ jobs:
echo "YARN_CACHE_DIR=$(yarn cache dir)" >> $GITHUB_OUTPUT
- name: yarn cache
id: yarn-cache-rw
uses: actions/cache@v3
if: github.ref_name == 'main'
with:
key: yarn-${{ hashFiles('yarn.lock') }}
path: ${{ steps.data.outputs.YARN_CACHE_DIR }}

- name: yarn cache
id: yarn-cache-ro
- name: yarn cache ro
uses: actions/cache/restore@v3
if: github.ref_name != 'main'
with:
key: yarn-${{ hashFiles('yarn.lock') }}
path: ${{ steps.data.outputs.YARN_CACHE_DIR }}

- name: turbo cache
id: turbo-cache-rw
uses: actions/cache@v3
if: github.ref_name == 'main'
with:
Expand All @@ -54,8 +51,7 @@ jobs:
restore-keys: |
turbo-
- name: turbo cache
id: turbo-cache-ro
- name: turbo cache ro
uses: actions/cache/restore@v3
if: github.ref_name != 'main'
with:
Expand All @@ -68,3 +64,38 @@ jobs:
run: |
yarn install
yarn ci:build
build-doc:
runs-on: ubuntu-latest
needs: build

steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: '20'

- name: data
id: data
run: |
echo "YARN_CACHE_DIR=$(yarn cache dir)" >> $GITHUB_OUTPUT
- name: yarn cache ro
uses: actions/cache/restore@v3
with:
key: yarn-${{ hashFiles('yarn.lock') }}
path: ${{ steps.data.outputs.YARN_CACHE_DIR }}

- name: turbo cache ro
uses: actions/cache/restore@v3
with:
path: .turbo
key: turbo-${{ github.sha }}
restore-keys: |
turbo-
- name: build
run: |
yarn install
yarn doc:build
2 changes: 1 addition & 1 deletion .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
echo "NPM_TAG=$(echo ${{ github.event.inputs.version }} | cut -d '-' -f2 -s | cut -d '.' -f1 -s)" >> $GITHUB_OUTPUT
echo "YARN_CACHE_DIR=$(yarn cache dir)" >> $GITHUB_OUTPUT
- name: yarn cache
- name: yarn cache ro
uses: actions/cache/restore@v3
with:
key: yarn-${{ hashFiles('yarn.lock') }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
run: |
echo "YARN_CACHE_DIR=$(yarn cache dir)" >> $GITHUB_OUTPUT
- name: yarn cache
- name: yarn cache ro
uses: actions/cache/restore@v3
with:
key: yarn-${{ hashFiles('yarn.lock') }}
Expand Down

0 comments on commit c5d9053

Please sign in to comment.