Skip to content

Build and Deploy Docs #6

Build and Deploy Docs

Build and Deploy Docs #6

name: Build and Deploy Docs
env:
DOCS_DEST_DIR: /disqus/
on:
push:
branches:
- v5
paths:
- 'docs/**'
pull_request:
branches:
- v5
paths:
- 'docs/**'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./docs
strategy:
fail-fast: true
matrix:
node-version: [ 20.x ]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run docs:build
- run: cp -vr docs/.vitepress/dist $GITHUB_WORKSPACE
- name: rsync deployments
uses: burnett01/[email protected]
with:
switches: -avzr
path: ./dist/
remote_path: ${{ secrets.NYS_DOCS_ROOT }}${{ env.DOCS_DEST_DIR }}
remote_host: ${{ secrets.NYS_DEPLOY_REMOTE_HOST }}
remote_port: ${{ secrets.NYS_DEPLOY_REMOTE_PORT }}
remote_user: ${{ secrets.NYS_DEPLOY_REMOTE_USER }}
remote_key: ${{ secrets.NYS_DEPLOY_PRIVATE_KEY }}