Skip to content

Commit

Permalink
Add publish docs workflow (for node)
Browse files Browse the repository at this point in the history
  • Loading branch information
djbe committed May 16, 2024
1 parent 9bbb6ea commit dd34d32
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/node-publish-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
name: Deploy Node documentation to GitHub Pages

#
# Deploy node documentation to github pages.
#

on: # yamllint disable-line rule:truthy
workflow_call:
inputs:
dist-path:
description: Path to build output
default: 'packages/docs/.vitepress/dist/'
type: string

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ inputs.node-version }}
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build documentation
run: pnpm docs:build
- name: Store archive
uses: actions/upload-pages-artifact@v3
with:
path: ${{ inputs.dist-path }}
deploy:
name: Deploy
needs: build
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

0 comments on commit dd34d32

Please sign in to comment.