I am Insane #2
2 changed files with 50 additions and 1 deletions
49
.forgejo/workflows/build.yml
Normal file
49
.forgejo/workflows/build.yml
Normal file
|
@ -0,0 +1,49 @@
|
||||||
|
name: Update API Documentation
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
paths:
|
||||||
|
- 'openapi.yaml' # Trigger when openapi.yaml changes
|
||||||
|
branches:
|
||||||
|
- main # or your default branch
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
convert-and-push:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Checkout wiki
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
repository: ${{github.repository}}.wiki
|
||||||
|
path: wiki
|
||||||
|
|
||||||
|
- name: Setup Node.js
|
||||||
|
uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version: '16'
|
||||||
|
|
||||||
|
- name: Install Widdershins
|
||||||
|
run: npm install -g widdershins
|
||||||
|
|
||||||
|
- name: Convert OpenAPI to Markdown
|
||||||
|
run: |
|
||||||
|
widdershins openapi.yaml -o wiki/api.md --omitHeader true
|
||||||
|
|
||||||
|
- name: Configure Git
|
||||||
|
run: |
|
||||||
|
cd wiki
|
||||||
|
git config --local user.email "action@github.com"
|
||||||
|
git config --local user.name "GitHub Action"
|
||||||
|
|
||||||
|
- name: Commit and push changes to wiki
|
||||||
|
run: |
|
||||||
|
cd wiki
|
||||||
|
git add api.md
|
||||||
|
git diff-index --quiet HEAD || git commit -m "Update API documentation"
|
||||||
|
git push
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
@ -5,4 +5,4 @@ there are a bunch of webservers i host for my personal use, mostly for different
|
||||||
i use different hrt terms as a naming scheme for my machines. my main pc is called estrogen, my weak main vps is called bica, and the vps i use to host most of my webservers is called mono (as in monotherapy). so every webserver will most likely be under \<something>.mono.exhq.dev
|
i use different hrt terms as a naming scheme for my machines. my main pc is called estrogen, my weak main vps is called bica, and the vps i use to host most of my webservers is called mono (as in monotherapy). so every webserver will most likely be under \<something>.mono.exhq.dev
|
||||||
|
|
||||||
## endpoints
|
## endpoints
|
||||||
see: [wiki](./wiki)
|
see wiki
|
||||||
|
|
Loading…
Reference in a new issue