Skip to content

Improved gh actions

Improved gh actions #2

name: Publish JSDoc documentation in Node.js app in GitHub Pages
on:
push:
branches: [ "dev" ]
pull_request:
branches: [ "dev" ]
jobs:
gh-pages:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [ 22.x ]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
- name: Install dependencies
run: npm ci
- name: Optional build step
run: npm run build --if-present
- name: Generate JSDoc
run: npm run docs
- name: Deploy to GitHub Pages
uses: JamesIves/[email protected]
with:
token: ${{ secrets.GH_PAGES_TOKEN }}
branch: gh-pages # The branch the action should deploy to.
folder: public