diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index 9a63c4342fa..980c9eaaef2 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -28,6 +28,15 @@ jobs: uses: actions/setup-node@v4 with: 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 env: ALGOLIA_APP_ID: 244V8V9FGG @@ -37,7 +46,7 @@ jobs: ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }} REFERENCE: ${{ github.event.inputs.build-refname }} BUILD_VERSION: ${{ github.event.inputs.build-version }} - run: node run.js + run: node run.js --no-checkout - name: Sync Documentation uses: spring-io/spring-doc-actions/rsync-antora-reference@v0.0.15 with: diff --git a/run.js b/run.js index 57dc66ffb49..d2c5d3ed7d4 100644 --- a/run.js +++ b/run.js @@ -7,8 +7,10 @@ async function main() { try { checkout(process.argv.includes('--no-checkout')) - install(process.argv.includes('--no-install')) - run(process.argv.includes('--no-run')) + if (!process.argv.includes('--only-checkout')) { + install(process.argv.includes('--no-install')) + run(process.argv.includes('--no-run')) + } } catch (error) { console.log("Unexpected error") process.exitCode = (error.exitCode) ? error.exitCode : 1