mirror of
https://github.com/lvgl/lvgl.git
synced 2026-06-01 00:51:49 +08:00
ci(docs): fix examples build error when not rebased fully (#8880)
This commit is contained in:
@@ -63,13 +63,8 @@ jobs:
|
|||||||
uses: hendrikmuhs/ccache-action@v1
|
uses: hendrikmuhs/ccache-action@v1
|
||||||
- name: Build examples (with cache)
|
- name: Build examples (with cache)
|
||||||
run: |
|
run: |
|
||||||
if [ "${{ github.event_name }}" == "pull_request" ]; then
|
REPO_URL="${{ github.server_url }}/${{ github.repository }}"
|
||||||
REPO_URL="${{ github.event.pull_request.head.repo.clone_url }}"
|
COMMIT_REF="${{ github.sha }}"
|
||||||
COMMIT_REF="${{ github.event.pull_request.head.sha }}"
|
|
||||||
else
|
|
||||||
REPO_URL="${{ github.server_url }}/${{ github.repository }}"
|
|
||||||
COMMIT_REF="${{ github.sha }}"
|
|
||||||
fi
|
|
||||||
./scripts/build_html_examples.sh "$REPO_URL" "$COMMIT_REF"
|
./scripts/build_html_examples.sh "$REPO_URL" "$COMMIT_REF"
|
||||||
- name: Build docs
|
- name: Build docs
|
||||||
run: docs/build.py html
|
run: docs/build.py html
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ if [ -n "$REPO_URL" ] && [ -n "$COMMIT_REF" ]; then
|
|||||||
echo "Using provided repo URL: $REPO_URL and commit ref: $COMMIT_REF for lvgl submodule"
|
echo "Using provided repo URL: $REPO_URL and commit ref: $COMMIT_REF for lvgl submodule"
|
||||||
git remote set-url origin "$REPO_URL"
|
git remote set-url origin "$REPO_URL"
|
||||||
git fetch origin
|
git fetch origin
|
||||||
|
git fetch origin '+refs/pull/*:refs/remotes/origin/pull/*'
|
||||||
git checkout "$COMMIT_REF"
|
git checkout "$COMMIT_REF"
|
||||||
else
|
else
|
||||||
CURRENT_REF="$(git rev-parse HEAD)"
|
CURRENT_REF="$(git rev-parse HEAD)"
|
||||||
|
|||||||
Reference in New Issue
Block a user