mirror of
https://github.com/orbbec/OrbbecSDK_ROS2.git
synced 2026-10-07 21:37:46 +08:00
docs: update GitHub Actions workflow for documentation deployment
This commit is contained in:
@@ -9,12 +9,10 @@ on:
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
pages: write
|
||||
id-token: write
|
||||
contents: write
|
||||
|
||||
concurrency:
|
||||
group: pages
|
||||
group: gh-pages
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
@@ -35,9 +33,6 @@ jobs:
|
||||
python -m pip install --upgrade pip
|
||||
pip install -r docs/en/requirements.txt -r docs/zh/requirements.txt jieba
|
||||
|
||||
- name: Configure Pages
|
||||
uses: actions/configure-pages@v5
|
||||
|
||||
- name: Build multilingual HTML
|
||||
run: |
|
||||
# Build English
|
||||
@@ -52,19 +47,9 @@ jobs:
|
||||
echo '<!DOCTYPE html><html><head><meta http-equiv="refresh" content="0; url=en/index.html"></head><body>Redirecting...</body></html>' > site/index.html
|
||||
touch site/.nojekyll
|
||||
|
||||
- name: Upload Pages artifact
|
||||
uses: actions/upload-pages-artifact@v3
|
||||
- name: Deploy to gh-pages branch
|
||||
uses: peaceiris/actions-gh-pages@v4
|
||||
with:
|
||||
path: site
|
||||
|
||||
deploy:
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
environment:
|
||||
name: github-pages
|
||||
url: ${{ steps.deployment.outputs.page_url }}
|
||||
|
||||
steps:
|
||||
- name: Deploy to GitHub Pages
|
||||
id: deployment
|
||||
uses: actions/deploy-pages@v4
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
publish_branch: gh-pages
|
||||
publish_dir: site
|
||||
|
||||
Reference in New Issue
Block a user