mirror of
https://github.com/discordeno/discordeno.git
synced 2026-09-17 08:47:22 +00:00
ci: Improve caching for Docusaurus build (#5241)
This commit is contained in:
+14
-25
@@ -20,26 +20,30 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
node-version: 22
|
node-version: 22
|
||||||
cache: yarn
|
cache: yarn
|
||||||
cache-dependency-path: |
|
cache-dependency-path: yarn.lock
|
||||||
yarn.lock
|
- uses: actions/setup-node@v7
|
||||||
website/yarn.lock
|
with:
|
||||||
|
cache: yarn
|
||||||
|
cache-dependency-path: website/yarn.lock
|
||||||
- name: yarn install (root)
|
- name: yarn install (root)
|
||||||
run: yarn install --immutable
|
run: yarn install --immutable
|
||||||
|
# Root turbo cache
|
||||||
- name: Cache for Turbo
|
- name: Cache for Turbo
|
||||||
uses: rharkor/caching-for-turbo@v2.5.1
|
uses: rharkor/caching-for-turbo@v2.5.1
|
||||||
with:
|
with:
|
||||||
cache-prefix: turbo-cache-
|
cache-prefix: turbo-cache-
|
||||||
- name: Cache for Turbo
|
|
||||||
uses: rharkor/caching-for-turbo@v2.5.1
|
|
||||||
with:
|
|
||||||
cache-prefix: turbo-cache-website-
|
|
||||||
server-port: 41231 # The default is 41230, but we use a different cache key so we need a different port
|
|
||||||
- name: Build all pkg
|
- name: Build all pkg
|
||||||
run: yarn release-build
|
run: yarn build:type
|
||||||
- name: Build docs
|
- name: Build docs
|
||||||
run: yarn turbo build:doc --single-package
|
run: yarn turbo build:doc --single-package
|
||||||
- run: yarn install --immutable
|
- run: yarn install --immutable
|
||||||
working-directory: ./website
|
working-directory: ./website
|
||||||
|
# Website turbo cache
|
||||||
|
- name: Cache for Turbo
|
||||||
|
uses: rharkor/caching-for-turbo@v2.5.1
|
||||||
|
with:
|
||||||
|
cache-prefix: turbo-cache-website-
|
||||||
|
server-port: 41231
|
||||||
- name: Restore bundler cache
|
- name: Restore bundler cache
|
||||||
uses: actions/cache@v6
|
uses: actions/cache@v6
|
||||||
with:
|
with:
|
||||||
@@ -50,8 +54,6 @@ jobs:
|
|||||||
- name: Build website
|
- name: Build website
|
||||||
run: yarn turbo build
|
run: yarn turbo build
|
||||||
working-directory: ./website
|
working-directory: ./website
|
||||||
env:
|
|
||||||
TURBO_API: http://localhost:41231
|
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
uses: actions/upload-pages-artifact@v5
|
uses: actions/upload-pages-artifact@v5
|
||||||
with:
|
with:
|
||||||
@@ -62,21 +64,8 @@ jobs:
|
|||||||
- uses: actions/checkout@v7
|
- uses: actions/checkout@v7
|
||||||
- uses: actions/setup-node@v7
|
- uses: actions/setup-node@v7
|
||||||
with:
|
with:
|
||||||
node-version: 22
|
|
||||||
cache: yarn
|
cache: yarn
|
||||||
cache-dependency-path: |
|
cache-dependency-path: website/yarn.lock
|
||||||
yarn.lock
|
|
||||||
website/yarn.lock
|
|
||||||
- name: yarn install (root)
|
|
||||||
run: yarn install --immutable
|
|
||||||
- name: Cache for Turbo
|
|
||||||
uses: rharkor/caching-for-turbo@v2.5.1
|
|
||||||
with:
|
|
||||||
cache-prefix: turbo-cache-
|
|
||||||
- name: Build all pkg
|
|
||||||
run: yarn release-build
|
|
||||||
- name: Build docs
|
|
||||||
run: yarn turbo build:doc --single-package
|
|
||||||
- run: yarn install --immutable
|
- run: yarn install --immutable
|
||||||
working-directory: ./website
|
working-directory: ./website
|
||||||
- run: yarn typecheck
|
- run: yarn typecheck
|
||||||
|
|||||||
Reference in New Issue
Block a user