mirror of
https://github.com/lvgl/lvgl.git
synced 2026-05-20 04:11:36 +08:00
ci: build docs on pr (#8089)
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
name: Build docs
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
@@ -62,7 +63,14 @@ jobs:
|
||||
- name: ccache
|
||||
uses: hendrikmuhs/ccache-action@v1
|
||||
- name: Build examples (with cache)
|
||||
run: scripts/build_html_examples.sh
|
||||
run: |
|
||||
if [ "${{ github.event_name }}" == "pull_request" ]; then
|
||||
REPO_URL="${{ github.event.pull_request.head.repo.clone_url }}"
|
||||
COMMIT_REF="${{ github.event.pull_request.head.sha }}"
|
||||
./scripts/build_html_examples.sh "$REPO_URL" "$COMMIT_REF"
|
||||
else
|
||||
./scripts/build_html_examples.sh
|
||||
fi
|
||||
- name: Build docs
|
||||
run: docs/build.py html
|
||||
- name: Remove .doctrees
|
||||
@@ -72,6 +80,7 @@ jobs:
|
||||
echo "::set-output name=VERSION_NAME::$(scripts/find_version.sh)"
|
||||
id: version
|
||||
- name: Deploy to subfolder
|
||||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
|
||||
uses: JamesIves/github-pages-deploy-action@v4.7.3
|
||||
with:
|
||||
token: ${{ secrets.LVGL_BOT_TOKEN }}
|
||||
@@ -83,7 +92,7 @@ jobs:
|
||||
git-config-email: lvgl-bot@users.noreply.github.com
|
||||
single-commit: true
|
||||
- name: Deploy to master
|
||||
if: github.ref == 'refs/heads/master'
|
||||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
|
||||
uses: JamesIves/github-pages-deploy-action@v4.7.3
|
||||
with:
|
||||
token: ${{ secrets.LVGL_BOT_TOKEN }}
|
||||
|
||||
Reference in New Issue
Block a user