Merge pull request #211 from lf-lang/housekeeping/bump-major-npm-pack… #120
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: API docs | |
# Build and deploy documentation for code that is pushed to master. | |
on: | |
push: | |
branches: [ master ] | |
# Also allow running this workflow manually from the Actions tab. | |
workflow_dispatch: | |
jobs: | |
gen-api-docs: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v3 | |
- name: Setup Node.js environment | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
# Set this option if you want the action to check for the latest available version that satisfies the version spec | |
#check-latest: # optional | |
# Optional registry to set up for auth. Will set the registry in a project level .npmrc and .yarnrc file, and set up auth to read in from env.NODE_AUTH_TOKEN | |
cache: npm | |
# Used to specify the path to a dependency file: package-lock.json, yarn.lock, etc. Supports wildcards or a list of file names for caching multiple dependencies. | |
cache-dependency-path: package-lock.json | |
# Runs a single command using the runners shell | |
- name: Build the Docs | |
run: | | |
npm install | |
npm run doc | |
- name: Deploy to GitHub Pages | |
uses: Cecilapp/GitHub-Pages-deploy@v3 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
email: [email protected] | |
build_dir: docs | |
branch: gh-pages | |
#cname: domain.tld # optional | |
jekyll: no # optional | |
#commit_message: custom message # optional |