diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 392441385..665169ddb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -29,7 +29,7 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} - uses: actions/setup-python@v4 with: - python-version: '3.10' + python-version: '3.11' - name: Install ${{ matrix.tool.package }} run: | if [ -n "${{ matrix.tool.apt_dependencies }}" ]; then @@ -63,7 +63,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-python@v4 with: - python-version: '3.10' + python-version: '3.11' - name: Prepare environment run: | pwd diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml new file mode 100644 index 000000000..c12e0ff23 --- /dev/null +++ b/.github/workflows/gh-pages.yml @@ -0,0 +1,49 @@ +name: Build and Deploy to GitHub Pages + +on: + push: + branches: + - '3.11' + +jobs: + sphinx-lint: + name: Check docs (sphinx-lint) + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + token: ${{ secrets.GITHUB_TOKEN }} + - uses: actions/setup-python@v4 + with: + python-version: '3.11' + - name: Install sphinx-lint + run: python -m pip install --upgrade sphinx-lint + - name: Run sphinx-lint + run: 'sphinx-lint --enable default-role --ignore .git' + + deploy: + name: 'Generate docs and deploy to GitHub Pages' + runs-on: ubuntu-latest + needs: sphinx-lint + timeout-minutes: 30 + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + with: + python-version: '3.11' + - name: Prepare environment + run: | + git clone https://github.com/python/cpython.git venv/cpython/ + python -m pip install --upgrade pip setuptools wheel + python -m pip install -r requirements.txt -r venv/cpython/Doc/requirements.txt + - name: Make + run: make + - name: Deploy to GitHub Pages + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./venv/cpython/Doc/build/html + publish_branch: gh-pages + allow_empty_commit: true + user_name: 'github-actions[bot]' + user_email: 'github-actions[bot]@users.noreply.github.com' \ No newline at end of file