2021-04-23 17:45:34 -04:00
|
|
|
name: Build docs
|
2021-04-24 20:55:00 -04:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
2021-04-23 17:45:34 -04:00
|
|
|
jobs:
|
|
|
|
build-and-deploy:
|
2021-04-28 08:40:38 -04:00
|
|
|
if: github.repository == 'lvgl/lvgl'
|
2021-04-23 17:45:34 -04:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
persist-credentials: false
|
|
|
|
fetch-depth: 0
|
|
|
|
- name: Setup Python
|
|
|
|
uses: actions/setup-python@v1
|
|
|
|
with:
|
|
|
|
python-version: 3.7
|
2021-04-23 17:47:20 -04:00
|
|
|
- name: Install Doxygen
|
|
|
|
run: sudo apt-get install doxygen
|
2021-04-23 17:45:34 -04:00
|
|
|
- name: Install requirements
|
|
|
|
run: |
|
|
|
|
pip install --upgrade --upgrade-strategy eager sphinx recommonmark commonmark breathe sphinx-rtd-theme sphinx-markdown-tables sphinx-sitemap
|
|
|
|
- name: Build docs
|
|
|
|
run: docs/build.py
|
2021-04-28 08:40:38 -04:00
|
|
|
- name: Remove .doctrees
|
|
|
|
run: rm -rf out_html/.doctrees
|
2021-04-23 17:45:34 -04:00
|
|
|
- name: Retrieve version
|
|
|
|
run: |
|
|
|
|
echo "::set-output name=VERSION_NAME::$(scripts/find_version.sh)"
|
|
|
|
id: version
|
|
|
|
- name: Deploy
|
|
|
|
uses: JamesIves/github-pages-deploy-action@3.7.1
|
|
|
|
with:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
ACCESS_TOKEN: ${{ secrets.LVGL_BOT_TOKEN }}
|
|
|
|
REPOSITORY_NAME: lvgl/docs_compiled
|
|
|
|
BRANCH: gh-pages # The branch the action should deploy to.
|
|
|
|
FOLDER: out_html # The folder the action should deploy.
|
|
|
|
TARGET_FOLDER: ${{ steps.version.outputs.VERSION_NAME }}
|
|
|
|
PRESERVE: true
|