Skip to content

Merge pull request #105 from athombv/master #10

Merge pull request #105 from athombv/master

Merge pull request #105 from athombv/master #10

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/