Skip to content

fix docs edit branch link and trigger website deployment on workflow … #2

fix docs edit branch link and trigger website deployment on workflow …

fix docs edit branch link and trigger website deployment on workflow … #2

Workflow file for this run

name: Knex / Documentation deployment
on:
push:
branches:
- 'master'
paths:
- docs/**
- .github/workflows/**
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true
jobs:
deploy:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./docs
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16.x
# cache node_modules
- name: Restore cached dependencies
uses: actions/cache@v3
id: npm-cache
with:
path: |
**/node_modules
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-
# install dependencies if the cache did not hit
- name: Install dependencies
if: steps.npm-cache.outputs.cache-hit != 'true'
run: npm ci
- name: Build documentation
run: npm run build
- name: Deploy to gh-pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: .vitepress/dist
cname: knexjs.org
force_orphan: true