Skip to content

Commit f701ef4

Browse files
committed
chore: 👷 Added API docs action
1 parent fcf2d86 commit f701ef4

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

.github/workflows/docs.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Build changelog
2+
on:
3+
repository_dispatch:
4+
types: [ trigger-changelog-workflow ]
5+
workflow_dispatch:
6+
inputs:
7+
commit_message:
8+
description: "Commit message"
9+
required: false
10+
11+
jobs:
12+
package:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout repo
16+
uses: actions/checkout@v2
17+
with:
18+
fetch-depth: 0
19+
submodules: recursive
20+
- uses: actions/checkout@v2
21+
- name: build doctum docs
22+
uses: sudo-bot/action-doctum@v5
23+
with:
24+
config-file: doctum.php
25+
# parse, render or update
26+
method: "update"
27+
# (optional) defaults to '--output-format=github --no-ansi --no-progress -v'
28+
cli-args: "--output-format=github --no-ansi --no-progress -v"
29+
- uses: oleksiyrudenko/gha-git-credentials@v2-latest
30+
with:
31+
token: '${{ secrets.GITHUB_TOKEN }}'
32+
- run: "git commit -m \"docs: 📝 Updated API docs for commit ${{ github.sha }}\" -a"
33+
if: ${{ !github.event.inputs.commit_message && !github.event.inputs.next_version }}
34+
- run: "git commit -m \"${{ github.event.inputs.commit_message }}\" -a"
35+
if: ${{ github.event.inputs.commit_message }}
36+
- name: Push changes
37+
uses: ad-m/github-push-action@master
38+
with:
39+
github_token: ${{ secrets.GITHUB_TOKEN }}
40+
branch: ${{ github.ref }}

0 commit comments

Comments
 (0)