From 74064129a9d22203a3cf7dabd498a53df6b894b4 Mon Sep 17 00:00:00 2001 From: egeakman Date: Thu, 15 Dec 2022 19:19:53 +0300 Subject: [PATCH 1/4] gh-pages --- .github/workflows/build.yml | 4 +-- .github/workflows/gh-pages.yml | 51 ++++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/gh-pages.yml 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..c05ca28ff --- /dev/null +++ b/.github/workflows/gh-pages.yml @@ -0,0 +1,51 @@ +name: Build and Deploy to GitHub Pages + +on: + push: + branches: + - '3.11-gh-pages' + workflow-dispatch: + +if: github.ref == 'refs/heads/3.11-gh-pages' +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 From 91f4e683db340f0d310a2180bce2591b47d98b17 Mon Sep 17 00:00:00 2001 From: egeakman Date: Thu, 15 Dec 2022 19:21:17 +0300 Subject: [PATCH 2/4] gh-pages --- .github/workflows/gh-pages.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index c05ca28ff..d85df2a7b 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -4,7 +4,7 @@ on: push: branches: - '3.11-gh-pages' - workflow-dispatch: + workflow_dispatch: if: github.ref == 'refs/heads/3.11-gh-pages' jobs: From 3a1997c4b31bcb57669fc0d07846600f3032330d Mon Sep 17 00:00:00 2001 From: egeakman Date: Thu, 15 Dec 2022 19:22:35 +0300 Subject: [PATCH 3/4] gh-pages --- .github/workflows/gh-pages.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index d85df2a7b..9356a5f79 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -4,9 +4,7 @@ on: push: branches: - '3.11-gh-pages' - workflow_dispatch: -if: github.ref == 'refs/heads/3.11-gh-pages' jobs: sphinx-lint: name: Check docs (sphinx-lint) From 2fc8461041c5e8ddf58ccfe79df6612a3a9656ef Mon Sep 17 00:00:00 2001 From: egeakman Date: Thu, 15 Dec 2022 19:35:28 +0300 Subject: [PATCH 4/4] final --- .github/workflows/gh-pages.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index 9356a5f79..c12e0ff23 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -3,7 +3,7 @@ name: Build and Deploy to GitHub Pages on: push: branches: - - '3.11-gh-pages' + - '3.11' jobs: sphinx-lint: