mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-07-05 00:56:58 +08:00
Add caching to docs-build
Closes gh-40104
This commit is contained in:
parent
669a1eecd5
commit
67277f484d
11
.github/workflows/deploy-docs.yml
vendored
11
.github/workflows/deploy-docs.yml
vendored
@ -28,6 +28,15 @@ jobs:
|
|||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 20
|
node-version: 20
|
||||||
|
- name: Check Out 'package.json' From Main
|
||||||
|
run: node run.js --only-checkout
|
||||||
|
- name: Cache Files
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
key: antora-${{ hashFiles('package-lock.json', 'antora-playbook.yml') }}
|
||||||
|
path: |
|
||||||
|
~/.npm
|
||||||
|
~/.cache/antora
|
||||||
- name: Install and Run Antora
|
- name: Install and Run Antora
|
||||||
env:
|
env:
|
||||||
ALGOLIA_APP_ID: 244V8V9FGG
|
ALGOLIA_APP_ID: 244V8V9FGG
|
||||||
@ -37,7 +46,7 @@ jobs:
|
|||||||
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
|
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
|
||||||
REFERENCE: ${{ github.event.inputs.build-refname }}
|
REFERENCE: ${{ github.event.inputs.build-refname }}
|
||||||
BUILD_VERSION: ${{ github.event.inputs.build-version }}
|
BUILD_VERSION: ${{ github.event.inputs.build-version }}
|
||||||
run: node run.js
|
run: node run.js --no-checkout
|
||||||
- name: Sync Documentation
|
- name: Sync Documentation
|
||||||
uses: spring-io/spring-doc-actions/rsync-antora-reference@v0.0.15
|
uses: spring-io/spring-doc-actions/rsync-antora-reference@v0.0.15
|
||||||
with:
|
with:
|
||||||
|
6
run.js
6
run.js
@ -7,8 +7,10 @@
|
|||||||
async function main() {
|
async function main() {
|
||||||
try {
|
try {
|
||||||
checkout(process.argv.includes('--no-checkout'))
|
checkout(process.argv.includes('--no-checkout'))
|
||||||
install(process.argv.includes('--no-install'))
|
if (!process.argv.includes('--only-checkout')) {
|
||||||
run(process.argv.includes('--no-run'))
|
install(process.argv.includes('--no-install'))
|
||||||
|
run(process.argv.includes('--no-run'))
|
||||||
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log("Unexpected error")
|
console.log("Unexpected error")
|
||||||
process.exitCode = (error.exitCode) ? error.exitCode : 1
|
process.exitCode = (error.exitCode) ? error.exitCode : 1
|
||||||
|
Loading…
Reference in New Issue
Block a user