chore: Add docs build (#17101)
* chore: Add Docs build to CI * Added build-docs to flow * Updated to run in the /docs folder * Made web app build have consistent name * Added a kill after the command runs * Test the build * Added it to the PR flow
This commit is contained in:
1 parent
2c25f88100
commit
feefa26c90
3 files changed
+57
-1
No files matched your search
@@ -0,0 +1,41 @@
|
|||||||
|
# This is just to test this file
|
||||||
|
name: Build
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Build Docs
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
runs-on: buildjet-2vcpu-ubuntu-2204
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: ./.github/actions/dangerous-git-checkout
|
||||||
|
- name: Cache Docs build
|
||||||
|
uses: buildjet/cache@v4
|
||||||
|
id: cache-docs-build
|
||||||
|
env:
|
||||||
|
cache-name: docs-build
|
||||||
|
key-1: ${{ hashFiles('yarn.lock') }}
|
||||||
|
key-2: ${{ hashFiles('docs/**.*', '!**/node_modules') }}
|
||||||
|
key-3: ${{ github.event.pull_request.number || github.ref }}
|
||||||
|
key-4: ${{ github.sha }}
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
**/docs/**
|
||||||
|
key: ${{ runner.os }}-${{ env.cache-name }}-${{ env.key-1 }}-${{ env.key-2 }}-${{ env.key-3 }}-${{ env.key-4 }}
|
||||||
|
- name: Run build
|
||||||
|
working-directory: docs
|
||||||
|
run: |
|
||||||
|
export NODE_OPTIONS="--max_old_space_size=8192"
|
||||||
|
if [ ${{ steps.cache-docs-build.outputs.cache-hit }} == 'true' ]; then
|
||||||
|
echo "Cache hit for Docs build. Skipping build."
|
||||||
|
else
|
||||||
|
npm install -g mintlify
|
||||||
|
mintlify dev &
|
||||||
|
sleep 5 # Let it run for 5 seconds
|
||||||
|
kill $!
|
||||||
|
fi
|
||||||
|
shell: bash
|
||||||
@@ -139,6 +139,13 @@ jobs:
|
|||||||
uses: ./.github/workflows/atoms-production-build.yml
|
uses: ./.github/workflows/atoms-production-build.yml
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|
||||||
|
build-docs:
|
||||||
|
name: Production builds
|
||||||
|
needs: [changes, check-label, deps]
|
||||||
|
if: ${{ needs.check-label.outputs.run-e2e == 'true' && needs.changes.outputs.has-files-requiring-all-checks == 'true' }}
|
||||||
|
uses: ./.github/workflows/docs-build.yml
|
||||||
|
secrets: inherit
|
||||||
|
|
||||||
build:
|
build:
|
||||||
name: Production builds
|
name: Production builds
|
||||||
needs: [changes, check-label, deps]
|
needs: [changes, check-label, deps]
|
||||||
@@ -146,6 +153,13 @@ jobs:
|
|||||||
uses: ./.github/workflows/production-build-without-database.yml
|
uses: ./.github/workflows/production-build-without-database.yml
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|
||||||
|
build-docs:
|
||||||
|
name: Production builds
|
||||||
|
needs: [changes, check-label, deps]
|
||||||
|
if: ${{ needs.changes.outputs.has-files-requiring-all-checks == 'true' }}
|
||||||
|
uses: ./.github/workflows/docs-build.yml
|
||||||
|
secrets: inherit
|
||||||
|
|
||||||
integration-test:
|
integration-test:
|
||||||
name: Tests
|
name: Tests
|
||||||
needs: [changes, check-label, build, build-api-v1, build-api-v2]
|
needs: [changes, check-label, build, build-api-v1, build-api-v2]
|
||||||
@@ -225,6 +239,7 @@ jobs:
|
|||||||
build-api-v1,
|
build-api-v1,
|
||||||
build-api-v2,
|
build-api-v2,
|
||||||
build-atoms,
|
build-atoms,
|
||||||
|
build-docs,
|
||||||
e2e,
|
e2e,
|
||||||
e2e-api-v2,
|
e2e-api-v2,
|
||||||
e2e-embed,
|
e2e-embed,
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ env:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: Web App
|
name: Build Web App
|
||||||
runs-on: buildjet-4vcpu-ubuntu-2204
|
runs-on: buildjet-4vcpu-ubuntu-2204
|
||||||
timeout-minutes: 30
|
timeout-minutes: 30
|
||||||
steps:
|
steps:
|
||||||
|
|||||||
Reference in new issue
Block a user