Merge branch 'release/1.6.56' into v1 #38
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
name: Build and Deploy Docs | |
env: | |
DOCS_DEST_DIR: /image-optimize/v1/ | |
on: | |
push: | |
branches: | |
- v1 | |
paths: | |
- 'docs/**' | |
pull_request: | |
branches: | |
- v1 | |
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 --delete | |
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 }} |