Files
Basalt2/.github/workflows/docs.yml
Robert Jelic 66e47f35fb Test
2025-02-10 06:28:47 +01:00

37 lines
944 B
YAML

name: Build Docs
on:
pull_request:
branches:
- main
push:
branches:
- main
jobs:
build:
name: Build docs
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Lua
uses: leafo/gh-actions-lua@v8
with:
luaVersion: 5.4
- name: Create docs directory
run: mkdir -p temp_docs
- name: Process markdown files
run: |
find src -type f -name "*.lua" | while read file; do
filename=$(basename "$file")
lua markdown.lua "$file" "temp_docs/${filename%.lua}.md"
done
- name: Setup final structure
run: |
mkdir -p docs
mv temp_docs docs/references
- name: Deploy
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs