Merge pull request #1669 from BenediktHeinrichs/BenediktHeinrichs/iss… #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow builds and deploys the docs to GitHub Pages | |
name: docs-github-pages-deploy | |
on: | |
push: | |
paths: | |
- 'apps/docs/**' | |
- '.github/workflows/docs-deploy.yaml' | |
branches: | |
- main | |
workflow_dispatch: {} | |
jobs: | |
build-and-deploy: | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
concurrency: ci-${{ github.ref }} # Recommended if you intend to make multiple deployments in quick succession. | |
runs-on: ubuntu-latest | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- name: Clone Repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20.x.x | |
- name: Install PNPM | |
uses: pnpm/action-setup@v2 | |
id: pnpm-install | |
- name: Get PNPM Store Directory | |
id: pnpm-cache | |
shell: bash | |
run: | | |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT | |
- name: Setup PNPM Cache | |
uses: actions/cache@v3 | |
with: | |
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} | |
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-pnpm-store- | |
- name: Install Dependencies | |
run: pnpm install --ignore-scripts --frozen-lockfile | |
- name: Build Library | |
run: pnpm run build --filter docs | |
- name: Configure Pages | |
uses: actions/configure-pages@v3 | |
- name: Upload Artifact | |
uses: actions/upload-pages-artifact@v2 | |
with: | |
path: ./apps/docs/.vitepress/dist | |
- name: Deploy Pages | |
id: deployment | |
uses: actions/deploy-pages@v1 |