48 lines
1.2 KiB
YAML
48 lines
1.2 KiB
YAML
name: Build Docs
|
|
|
|
on:
|
|
workflow_call:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Configure git auth for submodules
|
|
run: git config --global url."https://x-access-token:${{ secrets.BUILD_TOKEN }}@git.datadunia.com/".insteadOf "https://git.datadunia.com/"
|
|
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
submodules: true
|
|
fetch-depth: 0
|
|
token: ${{ secrets.BUILD_TOKEN }}
|
|
persist-credentials: true
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '24'
|
|
|
|
- name: Hash package-lock
|
|
id: hash-npm
|
|
run: echo "hash=$(sha256sum apps/docs/package-lock.json 2>/dev/null || echo 'none') | cut -d' ' -f1)" >> "$GITHUB_OUTPUT"
|
|
|
|
- uses: actions/cache@v3
|
|
with:
|
|
path: |
|
|
~/.npm
|
|
key: npm-docs-${{ steps.hash-npm.outputs.hash }}
|
|
restore-keys: npm-docs-
|
|
|
|
- name: Install
|
|
working-directory: apps/docs
|
|
run: npm ci || npm install
|
|
|
|
- name: Build
|
|
working-directory: apps/docs
|
|
run: npm run docs:build
|
|
|
|
- name: Upload artifact
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: docs-dist
|
|
path: apps/docs/.vitepress/dist/
|