mirror of
https://github.com/sasjs/adapter.git
synced 2025-12-11 09:24:35 +00:00
45 lines
935 B
YAML
45 lines
935 B
YAML
name: Generate docs and Push to docs Branch
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
generate_and_push_docs:
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
matrix:
|
|
node-version: [lts/fermium]
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Setup Node
|
|
uses: actions/setup-node@v2
|
|
with:
|
|
node-version: ${{ matrix.node-version }}
|
|
cache: npm
|
|
|
|
- name: Install Dependencies
|
|
run: npm ci
|
|
|
|
- name: Ensure docs folder exists
|
|
run: |
|
|
rm -rf docs || true # avoid error if docs folder does not exist
|
|
mkdir docs
|
|
|
|
- name: Generate Docs
|
|
run: npm run typedoc
|
|
|
|
- name: Push generated docs
|
|
uses: peaceiris/actions-gh-pages@v3
|
|
with:
|
|
github_token: ${{ secrets.GH_TOKEN }}
|
|
publish_branch: gh-pages
|
|
publish_dir: ./docs
|
|
cname: adapter.sasjs.io
|
|
|