-
Notifications
You must be signed in to change notification settings - Fork 5
48 lines (42 loc) · 1.18 KB
/
publish-jsdoc-github-pages.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Deploy JSDoc To GitHub Pages
# Version: 2.0.0
# Modified: No
#
# Requirements:
# - An npm task `npm run jsdoc` that outputs `./jsdoc/`.
# - A JSDoc configuration file at `./docs/jsdoc.json`.
# - The 'GitHub Actions' team has 'Write' access to your repository.
#
# Description:
# This workflows build JSDoc, and published it to the `gh-pages` branch.
# Ensure to specify that branch in Settings → Pages.
on:
workflow_dispatch:
push:
branches:
- production
jobs:
deploy:
name: Build & Deploy to GitHub Pages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# Setup
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 16
registry-url: 'https://npm.pkg.github.com'
# Build
- name: Build
run: |
npm ci --ignore-scripts --audit=false
npm run jsdoc
env:
NODE_AUTH_TOKEN: ${{ secrets.HOMEY_GITHUB_ACTIONS_BOT_PERSONAL_ACCESS_TOKEN }}
# Deploy
- name: Deploy To GitHub Pages
uses: peaceiris/[email protected]
with:
personal_token: ${{ secrets.HOMEY_GITHUB_ACTIONS_BOT_PERSONAL_ACCESS_TOKEN }}
publish_dir: ./jsdoc/