40 lines
910 B
YAML
40 lines
910 B
YAML
name: Deploy docs on GitHub Pages
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
docs:
|
|
name: Deploy docs
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout main
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Setup Python
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: '3.10'
|
|
|
|
- name: Install ltchiptool
|
|
run: pip install ltchiptool
|
|
|
|
- name: Generate static JSON files
|
|
run: python docs/build_json.py
|
|
|
|
- name: Set custom domain
|
|
run: |
|
|
mkdir -p site/
|
|
echo docs.libretuya.ml > site/CNAME
|
|
|
|
- name: Deploy docs
|
|
uses: libretuya/mkdocs-deploy-gh-pages@master
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
CONFIG_FILE: mkdocs.yml
|
|
EXTRA_PACKAGES: build-base doxygen
|
|
REQUIREMENTS: docs/requirements.txt
|
|
CUSTOM_DOMAIN: docs.libretuya.ml
|