Skip to content

Commit

Permalink
docs: Added manual dispatch for regen API docs
Browse files Browse the repository at this point in the history
  • Loading branch information
cb1kenobi authored May 31, 2022
1 parent 568814c commit f98c36d
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/regen-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Regen Docs
on:
workflow_dispatch:
pull_request:
types: [ closed ]
branches: [ master ]
paths: [ 'apidoc/**' ]

jobs:
regen:
if: github.event.pull_request.merged == true || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
name: Trigger Regen

steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Setup node
uses: actions/setup-node@v2
with:
node-version: '16'
registry-url: 'https://registry.npmjs.org'

- name: Install dependencies
run: npm ci
if: steps.node-cache.outputs.cache-hit != 'true'

- run: npm run lint:docs
name: Lint

- name: Repository Dispatch
uses: peter-evans/repository-dispatch@v2
with:
event-type: regen-api-docs
token: ${{ secrets.REGEN_DOCS_GITHUB_TOKEN }}
repository: tidev/titanium-docs

0 comments on commit f98c36d

Please sign in to comment.