Skip to content

Merge branch 'release/4.0.7' into v4 #33

Merge branch 'release/4.0.7' into v4

Merge branch 'release/4.0.7' into v4 #33

name: Build and Deploy Docs
env:
DOCS_DEST_DIR: /image-optimize/v4/
on:
push:
branches:
- v4
paths:
- 'docs/**'
pull_request:
branches:
- v4
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 }}