Skip to content

build(deps): Bump actions/checkout from 3 to 4 #315

build(deps): Bump actions/checkout from 3 to 4

build(deps): Bump actions/checkout from 3 to 4 #315

Workflow file for this run

name: Documentation
on:
pull_request:
release:
types: [published]
jobs:
build-and-deploy:
runs-on: ubuntu-latest
name: Build and deploy
steps:
- name: Check actor permission level
# Only allow admin to deploy on release
if: github.event.release
uses: skjnldsv/check-actor-permission@e591dbfe838300c007028e1219ca82cc26e8d7c5 # v2
with:
require: admin
- name: Checkout
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v3.5.2
- name: Read package.json node and npm engines version
uses: skjnldsv/[email protected] # v2.1
id: versions
with:
fallbackNode: '^16'
fallbackNpm: '^8'
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
with:
node-version: ${{ steps.versions.outputs.nodeVersion }}
- name: Set up npm ${{ steps.versions.outputs.npmVersion }}
run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}"
- name: Install dependencies & build
run: |
npm ci
npm run build --if-present
npm run build:doc --if-present
- name: Deploy
# Only deploy on release
if: github.event.release
uses: peaceiris/actions-gh-pages@373f7f263a76c20808c831209c920827a82a2847 # v3.9.3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist/doc