Skip to content

Documentation

Documentation #161

Workflow file for this run

name: Documentation
on:
workflow_dispatch:
schedule:
# Run once every week on Sunday
- cron: 0 0 * * 0
push:
paths:
# Or if an include has been updated
- 'manifests/*.toml'
# Manual trigger
- 'trigger.txt'
jobs:
documentation:
name: Build Documentations
runs-on: ubuntu-latest
steps:
- name: Checkout manifests
uses: actions/checkout@v2
with:
ref: "master"
path: "manifests"
- name: Checkout bundles
uses: actions/checkout@v2
with:
ref: "bundles"
path: "bundles"
- name: Download Chumbucket
uses: dsaltares/fetch-gh-release-asset@master
with:
repo: "sourcemod-dev/docgen"
version: "tags/cb-0.4.3"
file: "chumbucket"
- name: Chumbucket +x
run: sudo chmod +x chumbucket
- name: Process manifests
run: |
for i in manifests/manifests/*.toml; do
[ -f "$i" ] || break
export manifest_file=$(basename -- "$i")
echo "Processing $manifest_file"
if [ -f "bundles/${manifest_file%.*}.bundle" ]; then
./chumbucket generate manifests/manifests/$manifest_file -b bundles/${manifest_file%.*}.bundle -o bundles/${manifest_file%.*}.bundle
else
./chumbucket generate manifests/manifests/$manifest_file -o bundles/${manifest_file%.*}.bundle
fi
done
ls -l bundles/
- name: Process bundle index
run: |
if [ -f "bundles/index" ]; then
./chumbucket build-index bundles -i bundles/index -o bundles/index
else
./chumbucket build-index bundles -o bundles/index
fi
- name: Commit changes
working-directory: bundles
run: |
if [ -n "$(git status --porcelain)" ]; then
git config --global user.name 'rumblefrog'
git config --global user.email '[email protected]'
git add -A
git commit -m 'Bundle generations'
git push
fi