Skip to content

Version Packages (#1167) #172

Version Packages (#1167)

Version Packages (#1167) #172

Workflow file for this run

name: Documentation Deployment
on:
push:
branches:
- 'main'
workflow_dispatch:
# Allow this job to clone the repo and create a page deployment
permissions:
contents: read
pages: write
id-token: write
jobs:
docs-changed:
runs-on: ubuntu-latest
outputs:
files: ${{ contains(steps.files.outputs.added_modified, 'apps/docs/') }}
steps:
- name: Get All Added and Modified Field
id: files
if: ${{ github.event_name != 'workflow_dispatch' }}
uses: jitterbit/get-changed-files@v1
- name: Echo contains
if: ${{ github.event_name != 'workflow_dispatch' }}
run: echo ${{ contains(steps.files.outputs.added_modified, 'apps/docs/') }}
build-docs:
runs-on: ubuntu-latest
needs:
- docs-changed
if: ${{ needs.docs-changed.outputs.files == 'true' || github.event_name == 'workflow_dispatch' }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20.x'
- name: Install pnpm
run: npm i -g pnpm
- name: Dependencies Install
run: pnpm i
- name: Build Docs
run: pnpm nx build docs
- name: Upload build
uses: actions/upload-pages-artifact@v3
with:
name: github-pages
path: dist/apps/docs/
if-no-files-found: error
docs-deploy:
runs-on: ubuntu-latest
needs:
- build-docs
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: GitHub Pages Deploy Step
uses: actions/deploy-pages@v4
id: deployment