|
| 1 | +name: Deploy Sphinx documentation to Pages |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - main |
| 7 | + |
| 8 | +jobs: |
| 9 | + build_en: |
| 10 | + timeout-minutes: 20 |
| 11 | + runs-on: ${{ matrix.os }} |
| 12 | + strategy: |
| 13 | + matrix: |
| 14 | + os: [ubuntu-latest] |
| 15 | + python-version: ['3.10'] |
| 16 | + env: |
| 17 | + OS: ${{ matrix.os }} |
| 18 | + PYTHON: '3.10' |
| 19 | + steps: |
| 20 | + - uses: actions/checkout@v3 |
| 21 | + - name: Setup Python |
| 22 | + uses: actions/setup-python@v4 |
| 23 | + with: |
| 24 | + python-version: '3.10' |
| 25 | + - name: Update setuptools |
| 26 | + run: | |
| 27 | + pip install setuptools==78.1.1 wheel==0.45.1 |
| 28 | + - name: Install Dependencies |
| 29 | + run: | |
| 30 | + pip install -q -e .[full] |
| 31 | + - name: Add execute permission to build.sh |
| 32 | + run: | |
| 33 | + chmod +x docs/tutorial/en/build.sh |
| 34 | + - name: Build English Documentation |
| 35 | + env: |
| 36 | + DASHSCOPE_API_KEY: ${{ secrets.DASHSCOPE_API_KEY }} |
| 37 | + run: | |
| 38 | + cd docs/tutorial/en/ |
| 39 | + ./build.sh |
| 40 | + - name: Deploy English Documentation |
| 41 | + uses: peaceiris/actions-gh-pages@v4 |
| 42 | + with: |
| 43 | + github_token: ${{ secrets.GITHUB_TOKEN }} |
| 44 | + publish_dir: docs/tutorial/en/build/html |
| 45 | + cname: doc.agentscope.io |
| 46 | + |
| 47 | + build_zh: |
| 48 | + needs: build_en |
| 49 | + timeout-minutes: 20 |
| 50 | + runs-on: ${{ matrix.os }} |
| 51 | + strategy: |
| 52 | + matrix: |
| 53 | + os: [ ubuntu-latest ] |
| 54 | + python-version: [ '3.10' ] |
| 55 | + env: |
| 56 | + OS: ${{ matrix.os }} |
| 57 | + PYTHON: '3.10' |
| 58 | + steps: |
| 59 | + - uses: actions/checkout@v3 |
| 60 | + - name: Setup Python |
| 61 | + uses: actions/setup-python@v4 |
| 62 | + with: |
| 63 | + python-version: '3.10' |
| 64 | + - name: Setup Node.js |
| 65 | + uses: actions/setup-node@v3 |
| 66 | + with: |
| 67 | + node-version: '16' |
| 68 | + - name: Verify npm installation |
| 69 | + run: npm --version |
| 70 | + - name: Update setuptools |
| 71 | + run: | |
| 72 | + pip install setuptools==78.1.1 wheel==0.45.1 |
| 73 | + - name: Install Dependencies |
| 74 | + run: | |
| 75 | + pip install -q -e .[full] |
| 76 | + - name: Add execute permission to build.sh |
| 77 | + run: | |
| 78 | + chmod +x docs/tutorial/zh_CN/build.sh |
| 79 | + - name: Build Chinese Documentation |
| 80 | + env: |
| 81 | + DASHSCOPE_API_KEY: ${{ secrets.DASHSCOPE_API_KEY }} |
| 82 | + run: | |
| 83 | + cd docs/tutorial/zh_CN/ |
| 84 | + ./build.sh |
| 85 | + - name: Deploy Chinese Documentation |
| 86 | + uses: peaceiris/actions-gh-pages@v4 |
| 87 | + with: |
| 88 | + github_token: ${{ secrets.GITHUB_TOKEN }} |
| 89 | + publish_dir: docs/tutorial/zh_CN/build/html |
| 90 | + destination_dir: zh_CN |
| 91 | + cname: doc.agentscope.io |
0 commit comments