mirror of
https://github.com/orbbec/OrbbecSDK_ROS2.git
synced 2026-10-04 12:07:46 +08:00
58 lines
1.1 KiB
YAML
58 lines
1.1 KiB
YAML
name: Deploy Docs
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- docs/format_optimization
|
|
- docs/version_optimization
|
|
- Document
|
|
- main
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
pages: write
|
|
id-token: write
|
|
|
|
concurrency:
|
|
group: gh-pages
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.12"
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install -r docs/en/requirements.txt -r docs/zh/requirements.txt jieba
|
|
|
|
- name: Build multilingual HTML
|
|
run: |
|
|
python docs/build_versions.py
|
|
|
|
- name: Upload Pages artifact
|
|
uses: actions/upload-pages-artifact@v3
|
|
with:
|
|
path: site
|
|
|
|
deploy:
|
|
needs: build
|
|
runs-on: ubuntu-latest
|
|
environment:
|
|
name: github-pages
|
|
steps:
|
|
- name: Deploy to GitHub Pages
|
|
uses: actions/deploy-pages@v4
|