Update documentation. #19
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Generate | |
on: | |
push: | |
branches: | |
- dev | |
paths: | |
- 'api/**.lua' | |
- '!api/init.lua' | |
permissions: | |
contents: write | |
jobs: | |
generate: | |
name: Generate | |
runs-on: ubuntu-latest | |
steps: | |
- name: Update Packages | |
run: sudo apt update | |
- name: Install Packages | |
run: sudo apt install -y libfuse2 | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
ref: dev | |
path: docs | |
- name: Download LÖVR | |
run: curl -sOL https://lovr.org/f/lovr-x86_64.AppImage && chmod +x lovr-x86_64.AppImage | |
- name: Generate | |
run: ./lovr-x86_64.AppImage docs/api cats | |
- name: Format | |
run: | | |
curl -o stylua.zip -sL https://github.com/JohnnyMorganz/StyLua/releases/download/v2.0.1/stylua-linux-x86_64.zip | |
unzip stylua.zip | |
chmod +x stylua | |
./stylua library | |
- name: Checkout cats branch | |
uses: actions/checkout@v4 | |
with: | |
ref: cats | |
path: cats | |
- name: Publish | |
run: | | |
rm -rf cats/library | |
mv library cats | |
cd cats | |
if ! git diff --quiet; then | |
git config --global user.name 'bjornbytes' | |
git config --global user.email '[email protected]' | |
git commit -am "Rebuild;" | |
git push origin cats | |
else | |
echo "No changes." | |
fi |