2023-09-18 18:17:18 +02:00
|
|
|
name: lua_api_deploy
|
|
|
|
|
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
pages: write
|
|
|
|
id-token: write
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
paths:
|
|
|
|
- '.github/workflows/lua_api_deploy.yml'
|
|
|
|
- 'doc/lua_api.md'
|
|
|
|
- 'doc/mkdocs/'
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
2024-03-24 11:50:41 +01:00
|
|
|
if: github.repository == 'minetest/minetest'
|
|
|
|
runs-on: ubuntu-latest
|
2023-09-18 18:17:18 +02:00
|
|
|
steps:
|
2024-02-17 15:34:40 +01:00
|
|
|
- uses: actions/checkout@v4
|
2023-09-18 18:17:18 +02:00
|
|
|
|
|
|
|
- name: Set up Python
|
2024-02-17 15:34:40 +01:00
|
|
|
uses: actions/setup-python@v5
|
2023-09-18 18:17:18 +02:00
|
|
|
with:
|
|
|
|
python-version: 3.11
|
|
|
|
|
|
|
|
- name: Install mkdocs
|
|
|
|
run: |
|
|
|
|
pip install -U -r doc/mkdocs/requirements.txt
|
|
|
|
|
|
|
|
- name: Build documentation
|
|
|
|
run: |
|
|
|
|
cd doc/mkdocs/
|
|
|
|
./build.sh
|
|
|
|
|
|
|
|
- name: Setup Pages
|
2024-02-17 15:34:40 +01:00
|
|
|
uses: actions/configure-pages@v4
|
2023-09-18 18:17:18 +02:00
|
|
|
|
|
|
|
- name: Upload artifact
|
2024-02-17 15:34:40 +01:00
|
|
|
uses: actions/upload-pages-artifact@v3
|
2023-09-18 18:17:18 +02:00
|
|
|
with:
|
|
|
|
path: 'public/'
|
|
|
|
|
|
|
|
- name: Deploy to GitHub Pages
|
|
|
|
id: deployment
|
2024-02-17 15:34:40 +01:00
|
|
|
uses: actions/deploy-pages@v4
|