{"id":354566,"date":"2024-05-20T22:50:50","date_gmt":"2024-05-20T22:50:50","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=354566"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=354566","title":{"rendered":"<span>\u00ab\u041c\u0443\u043b\u044c\u0442\u0438\u0432\u0435\u0440\u0441\u0438\u043e\u043d\u043d\u0430\u044f\u00bb \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u0441 GitHub Pages<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041d\u0435\u0434\u0430\u0432\u043d\u043e \u043c\u043d\u0435 \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u043e\u0441\u044c \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0438 \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e \u0434\u043b\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u0437 \u0441\u0432\u043e\u0438\u0445 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u043d\u0430 Python. \u041d\u0430\u043f\u0438\u0441\u0430\u043b \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e, \u0441\u043e\u0431\u0440\u0430\u043b Sphinx&#8217;\u043e\u043c, \u0434\u0430\u043b\u044c\u0448\u0435 \u0441\u043e\u0431\u0440\u0430\u043b\u0441\u044f \u0437\u0430\u043b\u0438\u0432\u0430\u0442\u044c \u043d\u0430 <a href=\"https:\/\/readthedocs.org\" rel=\"noopener noreferrer nofollow\">readthedocs.org<\/a> \u0438 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b \u0447\u0442\u043e \u0431\u0435\u0437 VPN \u0441\u0430\u0439\u0442 \u043d\u0435 \u0430\u043b\u0451. \u0411\u043e\u043b\u0435\u0435 \u0442\u043e\u0433\u043e, \u043f\u043e\u0447\u0435\u043c\u0443 \u0442\u043e \u0438 \u0441 VPN \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u043b\u043e\u0441\u044c \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u0441 GitHub.<\/p>\n<p>\u041d\u0435 \u0434\u043e\u043b\u0433\u043e \u0434\u0443\u043c\u0430\u044f, \u0440\u0435\u0448\u0438\u043b \u0438\u0437\u0443\u0447\u0438\u0442\u044c \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044e \u043d\u0430 &#171;\u0440\u044b\u043d\u043a\u0435&#187; \u0438 \u043d\u0430\u0448\u0435\u043b \u043d\u0435\u043f\u043b\u043e\u0445\u0443\u044e \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u0443 &#8212; GitHub Pages. \u042d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u044f \u0434\u0435\u043f\u043b\u043e\u0438\u043b \u043c\u0443\u043b\u044c\u0442\u0438\u0432\u0435\u0440\u0441\u0438\u043e\u043d\u043d\u0443\u044e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e \u043d\u0430 GitHub Pages c \u043f\u043e\u043c\u043e\u0449\u044c\u044e GitHub Actions (\u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0432\u044b \u0445\u043e\u0442\u044f \u0431\u044b \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u043a\u043e\u043c\u044b \u0441 \u0434\u0430\u043d\u043d\u043e\u0439 \u0444\u0438\u0447\u0435\u0439) \u0438 \u0441\u0432\u043e\u0438\u043c\u0438 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c\u0438 &#171;\u043a\u043e\u0441\u0442\u044b\u043b\u044f\u043c\u0438&#187;.<\/p>\n<h3>\u041f\u0438\u0448\u0435\u043c \u0441\u0442\u0430\u0440\u0442\u043e\u0432\u044b\u0439 workflow<\/h3>\n<p>\u0414\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430, \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u043e\u0435\u043a\u0442 \u0441\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043e\u0431\u0449\u0435\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043e\u0439:<\/p>\n<pre><code>.github\/     workflows\/         ... docs\/     requirements.txt     source\/         ...     ... src\/     ... LICENSE README.md ... <\/code><\/pre>\n<p>\u0412 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 <code>docs\/source<\/code> \u043b\u0435\u0436\u0430\u0442 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438 \u0431\u0443\u0434\u0443\u0449\u0435\u0433\u043e \u0441\u0430\u0439\u0442\u0430 Sphinx&#8217;\u043e\u043c, \u0432 <code>docs\/requirements.txt<\/code> \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 (sphinx, &#8230;). \u0412\u043e\u043e\u0431\u0449\u0435 \u0433\u043e\u0432\u043e\u0440\u044f, Sphinx \u0432 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043d\u0435 \u043f\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443, \u0442\u043e \u0435\u0441\u0442\u044c \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u0440\u0443\u0433\u0438\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438 \u0434\u043e\u043a\u043e\u0432 (\u0434\u0430 \u0438 \u043f\u0440\u043e\u0435\u043a\u0442 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0435 \u043d\u0430 Python).<\/p>\n<p>\u0414\u043b\u044f \u0434\u0435\u043f\u043b\u043e\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438, \u0433\u043b\u0430\u0432\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <a href=\"https:\/\/github.com\/peaceiris\/actions-gh-pages\" rel=\"noopener noreferrer nofollow\">peaceiris\/actions-gh-pages<\/a>. \u0414\u0430\u043d\u043d\u044b\u0439 \u044d\u043a\u0448\u043e\u043d \u0432 \u0432\u044b\u0431\u0440\u0430\u043d\u0443\u044e \u0432\u0435\u0442\u043a\u0443 (\u043f\u043e \u0434\u0435\u0444\u043e\u043b\u0442\u0443 \u044d\u0442\u043e <code>gh-pages<\/code>) \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043b\u0438\u0432\u0430\u0442\u044c \u0441\u043e\u0431\u0440\u0430\u043d\u043d\u044b\u0439 \u0441\u0430\u0439\u0442 \u0441 \u0434\u043e\u043a\u0430\u043c\u0438. \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u043c\u043e\u0436\u043d\u043e \u0441\u043b\u0438\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u0432 \u043f\u0430\u043f\u043a\u0443 <code>docs<\/code> \u0432\u0435\u0442\u043a\u0438 <code>main<\/code>, \u043d\u043e \u043f\u043e-\u043c\u043e\u0435\u043c\u0443 \u043e\u0442\u0434\u0435\u043b\u044f\u0442\u044c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e \u043e\u0442 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043a\u0443\u0434\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u043d\u0435\u0435.<\/p>\n<p>\u041d\u0430\u043f\u0438\u0448\u0435\u043c \u0442\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0448 \u0441\u0442\u0430\u0440\u0442\u043e\u0432\u044b\u0439 workflow \u0434\u043b\u044f \u0434\u0435\u043f\u043b\u043e\u044f \u0434\u043e\u043a\u043e\u0432. \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0444\u0430\u0439\u043b\u0438\u043a <code>docs.yaml<\/code> \u0432 \u043f\u0430\u043f\u043a\u0435 <code>.github\/workflows<\/code>:<\/p>\n<details class=\"spoiler\">\n<summary>\u0441\u0442\u0430\u0440\u0442\u043e\u0432\u044b\u0439 docs.yaml<\/summary>\n<div class=\"spoiler__content\">\n<pre><code>name: Docs  on:   push:     branches: [ main ]     tags:       - 'v*.*.*'  permissions:     contents: write  jobs:   docs-gen:     runs-on: ubuntu-latest     steps:       - uses: actions\/checkout@v3         with:           fetch-depth: 1       - uses: actions\/setup-python@v3         with:           python-version: 3.7       - name: Install dependencies         run: |           pip install -r docs\/requirements.txt       - name: Sphinx build         run: |           sphinx-build docs\/source docs\/_build       - name: Deploy docs         uses: peaceiris\/actions-gh-pages@v3         with:           allow_empty_commit: true           personal_token: ${{ secrets.DEPLOY_TOKEN }}           publish_branch: gh-pages           publish_dir: docs\/_build\/ <\/code><\/pre>\n<\/div>\n<\/details>\n<p>\u0418\u0442\u0430\u043a, \u0447\u0442\u043e \u0437\u0434\u0435\u0441\u044c \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442? \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u043e \u0448\u0430\u0433\u0430\u043c. \u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u0442\u0440\u0438\u0433\u0435\u0440 \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043d\u0430\u0448\u0435\u0433\u043e workflow:<\/p>\n<pre><code class=\"yaml\">on:   push:     branches: [ main ]     tags:       - 'v*.*.*' <\/code><\/pre>\n<p>\u042f \u0432\u044b\u0431\u0440\u0430\u043b \u0432\u0430\u0440\u0438\u0430\u043d\u0442 c push&#8217;\u0435\u043c \u0442\u0430\u0433\u0430 \u0432 \u0433\u043b\u0430\u0432\u043d\u0443\u044e \u0432\u0435\u0442\u043a\u0443 main, \u0447\u0442\u043e \u0432 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435 \u043b\u043e\u0433\u0438\u0447\u043d\u043e, \u0442\u0430\u043a \u0434\u0435\u043f\u043b\u043e\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442\u044c \u043f\u0440\u0438 \u0442\u0430\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u043d\u043e\u0432\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u041a\u0430\u043a \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u0432\u043e\u043e\u0431\u0449\u0435 \u043f\u0440\u0438 \u0441\u0440\u0435\u0437\u0435 \u0440\u0435\u043b\u0438\u0437\u0430<\/p>\n<pre><code class=\"yaml\">on:   release:     types: [ created ] <\/code><\/pre>\n<p>\u0438\u043b\u0438 \u043f\u0440\u0438 \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0432 \u043b\u044e\u0431\u043e\u0439 \u043c\u043e\u043c\u0435\u043d\u0442<\/p>\n<pre><code class=\"yaml\">on:   workflow_dispatch:     inputs:       ... <\/code><\/pre>\n<p>\u0412 \u0431\u043b\u043e\u043a\u0435 <code>permissions<\/code> \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u043f\u0440\u0430\u0432\u0430 \u043d\u0430 \u0437\u0430\u043f\u0438\u0441\u044c. \u041d\u0430\u043a\u043e\u043d\u0435\u0446 \u0432 \u043d\u0430\u0448\u0435\u0439 \u0434\u0436\u043e\u0431\u0435 <code>docs-gen<\/code> \u0441\u0442\u0430\u0432\u0438\u043c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0438\u0437 <code>docs\/requirements.txt<\/code> \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c sphinx:<\/p>\n<pre><code class=\"yaml\">- name: Sphinx build   run: |     sphinx-build docs\/source docs\/_build <\/code><\/pre>\n<p>\u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442 \u0434\u043e\u043a\u0438 \u0432 \u043f\u0430\u043f\u043e\u0447\u043a\u0443 <code>docs\/_build<\/code>.<\/p>\n<h3>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u044d\u043a\u0448\u043e\u043d actions-gh-pages<\/h3>\n<pre><code class=\"yaml\">- name: Deploy docs   uses: peaceiris\/actions-gh-pages@v3   with:     allow_empty_commit: true     personal_token: ${{ secrets.DEPLOY_TOKEN }}     publish_branch: gh-pages     publish_dir: docs\/_build\/ <\/code><\/pre>\n<p>\u0414\u0430\u043d\u043d\u044b\u0439 \u044d\u043a\u0448\u043e\u043d \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0435\u0441\u043b\u043e\u0436\u043d\u043e, \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0432\u0448\u0438\u0441\u044c \u0441\u0442\u0430\u0440\u0442\u043e\u0432\u044b\u043c \u043c\u0430\u043d\u0443\u0430\u043b\u043e\u043c \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0436\u0435\u043b\u0430\u0435\u043c\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442. \u041e\u0434\u043d\u0430\u043a\u043e, \u0435\u0441\u0442\u044c \u043d\u044e\u0430\u043d\u0441 \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u044f \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u0441\u044f. \u042d\u0442\u043e <code>personal_token<\/code>. \u041f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0433\u043e <code>GITHUB_TOKEN<\/code>, \u0442\u043e \u0435\u0441\u0442\u044c<\/p>\n<pre><code class=\"yaml\">github_token: ${{ secrets.GITHUB_TOKEN }} <\/code><\/pre>\n<p>\u0441\u043c\u0435\u043b\u043e \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u043b\u0435\u0442\u0435\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0430 \u0442\u0438\u043f\u0430 \u044d\u0442\u043e\u0439:<\/p>\n<pre><code>remote: error: GH006: Protected branch update failed for refs\/heads\/master. remote: error: Cannot force-push to this protected branch <\/code><\/pre>\n<p>\u0412 \u043c\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0443 \u043c\u0435\u043d\u044f \u0431\u044b\u043b\u0430 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430 \u0437\u0430\u0449\u0438\u0442\u0430 \u043d\u0430 \u0432\u0435\u0442\u043a\u0438, \u0438 GITHUB_TOKEN&#8217;\u0443 \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u043b\u043e \u043f\u0440\u0430\u0432 \u0434\u043b\u044f force push&#8217;\u0430. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u043e\u0437\u0434\u0430\u0435\u043c <em>PAT<\/em> (<em>Personal Access Token<\/em>) \u0441 \u043d\u0443\u0436\u043d\u044b\u043c\u0438 \u043f\u0440\u0430\u0432\u0430\u043c\u0438, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0435\u0433\u043e \u0432 \u0441\u0435\u043a\u0440\u0435\u0442\u044b (<code>secrets.DEPLOY_TOKEN<\/code>) \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c.<br \/> \u0412 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u043c \u043a\u0430\u043a\u0438\u0445-\u0442\u043e \u0441\u0438\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u043d\u0435 \u0431\u044b\u043b\u043e.<\/p>\n<h3>\u0412\u043a\u043b\u044e\u0447\u0430\u0435\u043c GitHub Pages<\/h3>\n<p>\u0418\u0434\u0435\u043c \u0432 <em>settings<\/em> \u043d\u0430\u0448\u0435\u0433\u043e \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f \u0438 \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 <em>Code and automation<\/em> \u0436\u043c\u0435\u043c \u043d\u0430 <em>Pages<\/em>. \u0412 \u043f\u043e\u0434\u0440\u0430\u0437\u0434\u0435\u043b\u0435 <em>Source<\/em> \u0440\u0430\u0437\u0434\u0435\u043b\u0430 <em>Build and deployment<\/em> \u0432\u044b\u0431\u0438\u0440\u0430\u044e <code>Deploy from a branch<\/code>, \u0430 \u0432 \u043f\u043e\u0434\u0440\u0430\u0437\u0434\u0435\u043b\u0435 <em>Branch<\/em> \u0432\u044b\u0431\u0438\u0440\u0430\u044e \u0432\u0435\u0442\u043a\u0443 <code>gh-pages<\/code> \u0438 \u043c\u0435\u0441\u0442\u043e <code>\/root<\/code> \u043e\u0442\u043a\u0443\u0434\u0430 \u0431\u0443\u0434\u0443\u0442 \u0433\u0440\u0443\u0437\u0438\u0442\u044c\u0441\u044f \u0434\u043e\u043a\u0438. \u0422\u0435\u043f\u0435\u0440\u044c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u0433\u0440\u0443\u0437\u0438\u0442\u044c\u0441\u044f \u0438\u0437 \u043a\u043e\u0440\u043d\u044f gh-pages.<\/p>\n<p>\u0412 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435 \u043d\u0430 \u044d\u0442\u043e\u043c \u0438 \u0432\u0441\u0435 \u0441 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u043e\u0439 GitHub Pages. \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u0438 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438 \u043d\u0430\u0448\u0435\u0433\u043e workflow <code>Docs<\/code>, \u043f\u043e\u0441\u043b\u0435 \u0431\u0443\u0434\u0435\u0442 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u043e\u043c \u0437\u0430\u043f\u0443\u0449\u0435\u043d GitHub Pages&#8217;\u043e\u0432\u0441\u043a\u0438\u0439 workflow <code>pages-build-deployment<\/code> \u0438 \u0441\u0442\u0430\u043d\u0435\u0442 \u0430\u043a\u0442\u0438\u0432\u043d\u044b\u043c \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u0441\u0430\u0439\u0442. \u041f\u0435\u0440\u0435\u0439\u0434\u044f \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435 \u0442\u0438\u043f\u0430 <a href=\"https:\/\/username.github.io\/reponame\/\" rel=\"noopener noreferrer nofollow\"><em>https:\/\/username.github.io\/reponame\/<\/em><\/a> \u0441\u043c\u043e\u0436\u0435\u043c \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442.<\/p>\n<h3>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u043c\u0443\u043b\u044c\u0442\u0438\u0432\u0435\u0440\u0441\u0438\u043e\u043d\u043d\u043e\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/h3>\n<p>\u0412\u0441\u0435 \u0431\u044b \u0445\u043e\u0440\u043e\u0448\u043e, \u043d\u043e \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043c\u044b \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u043e, \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u043f\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u043c \u043d\u043e\u0432\u043e\u043c \u0434\u0435\u043f\u043b\u043e\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0432\u0441\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 gh-pages \u0438 \u043f\u043e \u0438\u0442\u043e\u0433\u0443 \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0432\u0438\u0434\u0435\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e \u0434\u043b\u044f \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u0432 \u0442\u043e \u0432\u0440\u0435\u043c\u044f \u043a\u0430\u043a \u0434\u043b\u044f \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u0432\u0435\u0440\u0441\u0438\u0439 \u0432\u0441\u0435 \u0431\u0443\u0434\u0435\u0442 \u0441\u0442\u0435\u0440\u0442\u043e. \u041a\u043e\u043d\u0435\u0447\u043d\u043e \u043d\u0430\u0441 \u044d\u0442\u043e \u043d\u0435 \u0443\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442.<\/p>\n<p>\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u043c \u043d\u0430\u0448 workflow.<\/p>\n<details class=\"spoiler\">\n<summary>\u043f\u0440\u043e\u043a\u0430\u0447\u0435\u043d\u043d\u044b\u0439 docs.yaml<\/summary>\n<div class=\"spoiler__content\">\n<pre><code>name: Docs  on:   push:     branches: [ main ]     tags:       - 'v*.*.*'  permissions:     contents: write  jobs:   docs-gen:     runs-on: ubuntu-latest     steps:       - uses: actions\/checkout@v3         with:           fetch-depth: 1       - uses: actions\/setup-python@v3         with:           python-version: 3.7       - name: Install dependencies         run: |           pip install -r docs\/requirements.txt       - name: Sphinx build         run: |           sphinx-build docs\/source docs\/_build       - name: Deploy docs         uses: peaceiris\/actions-gh-pages@v3         with:           allow_empty_commit: true           destination_dir: .\/${{ github.ref_name }}           force_orphan: false           keep_files: true           personal_token: ${{ secrets.DEPLOY_TOKEN }}           publish_branch: gh-pages           publish_dir: docs\/_build\/       - name: Change redirect         uses: jannekem\/run-python-script-action@v1         id: script         with:           script: |             import re                          path, pattern = \"docs\/redirect\/index.html\", re.compile(r\"\\{\\s*%\\s*latest-version\\s*%\\s*}\")              with open(path, \"r\", encoding=\"utf8\") as file:                 content = pattern.sub(\"${{ github.ref_name }}\", file.read())              with open(path, \"w+\", encoding=\"utf8\") as file:                 file.write(content)       - name: Deploy redirect         uses: peaceiris\/actions-gh-pages@v3         with:           allow_empty_commit: true           force_orphan: false           keep_files: true           personal_token: ${{ secrets.DEPLOY_TOKEN }}           publish_branch: gh-pages           publish_dir: docs\/redirect\/ <\/code><\/pre>\n<\/div>\n<\/details>\n<p>\u0421\u0442\u0430\u0432\u0438\u043c<\/p>\n<pre><code class=\"yaml\">destination_dir: .\/${{ github.ref_name }} <\/code><\/pre>\n<p>\u0447\u0442\u043e \u0431\u044b \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u0433\u0440\u0443\u0437\u0438\u043b\u0430\u0441\u044c \u043d\u0435 \u0432 \u043a\u043e\u0440\u0435\u043d\u044c \u0432\u0435\u0442\u043a\u0438 gh-pages, \u0430 \u0432 \u043f\u0430\u043f\u043a\u0443 \u0441 \u0438\u043c\u0435\u043d\u0435\u043c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0433\u043e \u0442\u0430\u0433\u0430. \u0412 \u0438\u0442\u043e\u0433\u0435 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043a\u0430\u043a-\u0442\u043e \u0442\u0430\u043a:<\/p>\n<pre><code>v0.1.0\/     ... v0.2.0\/     ... ... <\/code><\/pre>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c<\/p>\n<pre><code class=\"yaml\">keep_files: true <\/code><\/pre>\n<p>\u0434\u043b\u044f \u043e\u0442\u043c\u0435\u043d\u044b \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u0438 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u0432 \u0432\u0435\u0442\u043a\u0435 gh-pages. \u041e\u0434\u043d\u0430\u043a\u043e \u043a\u0430\u043a \u0443\u043a\u0430\u0437\u0430\u043d\u043e \u0432 <a href=\"https:\/\/github.com\/peaceiris\/actions-gh-pages#%EF%B8%8F-keeping-existing-files-keep_files\" rel=\"noopener noreferrer nofollow\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/a>, actions-gh-pages \u0432\u0435\u0440\u0441\u0438\u044f 3 \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c <code>force_orphan<\/code>, \u043f\u043e\u044d\u0442\u043e\u043c\u0443<\/p>\n<pre><code class=\"yaml\">force_orphan: false <\/code><\/pre>\n<p>\u0418\u0442\u0430\u043a, \u0442\u0435\u043f\u0435\u0440\u044c \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0442\u0430\u0433\u0430 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u0438 \u043f\u043e\u043c\u0435\u0449\u0430\u0442\u044c\u0441\u044f \u043d\u0435 \u0432 \u043a\u043e\u0440\u0435\u043d\u044c gh-pages, \u0430 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0443\u044e \u043f\u0430\u043f\u043a\u0443 \u0441 \u0438\u043c\u0435\u043d\u0435\u043c \u044d\u0442\u043e\u0433\u043e \u0442\u0430\u0433\u0430. \u041d\u043e GitHub Pages \u0433\u0440\u0443\u0437\u0438\u0442 \u0441\u0430\u0439\u0442 \u0441 \u043a\u043e\u0440\u043d\u044f \u0432\u0435\u0442\u043a\u0438. \u0417\u043d\u0430\u0447\u0438\u0442 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u0440\u0435\u0434\u0438\u0440\u0435\u043a\u0442. \u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u0437\u0434\u0435\u0441\u044c \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u0442\u0443\u043f\u0438\u0442\u044c \u043f\u043e-\u0440\u0430\u0437\u043d\u043e\u043c\u0443. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u043e\u0436\u043d\u043e \u0432 \u0432\u0435\u0442\u043a\u0435 gh-pages \u0434\u0443\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0432 \u043f\u0430\u043f\u043a\u0443 \u0441 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c <code>main<\/code> \u0438 \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0432 \u043a\u043e\u0440\u0435\u043d\u044c \u0432\u0435\u0442\u043a\u0438 <code>index.html<\/code> \u0441\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u044b\u043c (\u0432\u0437\u044f\u0442\u043e \u043e\u0442 <a href=\"https:\/\/holzhaus.github.io\/sphinx-multiversion\/master\/github_pages.html#redirecting-from-the-document-root\" rel=\"noopener noreferrer nofollow\">\u0441\u044e\u0434\u0430<\/a>):<\/p>\n<pre><code>&lt;!DOCTYPE html> &lt;html>   &lt;head>     &lt;title>Redirecting to latest version\/&lt;\/title>     &lt;meta charset=\"utf-8\">     &lt;meta content=\"0; URL=https:\/\/username.github.io\/reponame\/main\/index.html\" http-equiv=\"refresh\">     &lt;link href=\"https:\/\/username.github.io\/reponame\/main\/index.html\" rel=\"canonical\">   &lt;\/head> &lt;\/html> <\/code><\/pre>\n<p>\u042f \u0436\u0435 \u043f\u043e\u0448\u0435\u043b \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0434\u0440\u0443\u0433\u0438\u043c \u043f\u0443\u0442\u0435\u043c. \u0412 \u043f\u0430\u043f\u043e\u0447\u043a\u0443 docs \u043d\u0430\u0448\u0435\u0433\u043e \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c <code>redirect\/index.html<\/code> \u0432\u0438\u0434\u0430:<\/p>\n<pre><code>&lt;!DOCTYPE html> &lt;html>   &lt;head>     &lt;title>Redirecting to latest-version\/&lt;\/title>     &lt;meta charset=\"utf-8\">     &lt;meta content=\"0; URL=https:\/\/username.github.io\/reponame\/{% latest-version %}\/index.html\" http-equiv=\"refresh\">     &lt;link href=\"https:\/\/username.github.io\/reponame\/{% latest-version %}\/index.html\" rel=\"canonical\">   &lt;\/head> &lt;\/html> <\/code><\/pre>\n<p>\u0430 \u0432 \u0434\u0436\u043e\u0431\u0443 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e 2 \u0448\u0430\u0433\u0430 &#8212; <code>Change redirect<\/code> \u0438 <code>Deploy redirect<\/code><\/p>\n<pre><code class=\"yaml\">- name: Change redirect   uses: jannekem\/run-python-script-action@v1   id: script   with:    script: |      import re           path, pattern = \"docs\/redirect\/index.html\", re.compile(r\"\\{\\s*%\\s*latest-version\\s*%\\s*}\")       with open(path, \"r\", encoding=\"utf8\") as file:          content = pattern.sub(\"${{ github.ref_name }}\", file.read())       with open(path, \"w+\", encoding=\"utf8\") as file:          file.write(content) - name: Deploy redirect   uses: peaceiris\/actions-gh-pages@v3   with:     allow_empty_commit: true     force_orphan: false     keep_files: true     personal_token: ${{ secrets.DEPLOY_TOKEN }}     publish_branch: gh-pages     publish_dir: docs\/redirect\/ <\/code><\/pre>\n<p>\u0412 <code>Change redirect<\/code> \u043f\u043e \u0441\u0443\u0442\u0438 \u044f \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u0432 \u0437\u0430\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0448\u0430\u0431\u043b\u043e\u043d, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043a\u0443 \u0438 Python. \u041f\u043e\u043d\u044f\u0442\u043d\u043e\u0435 \u0434\u0435\u043b\u043e \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0430 \u043b\u044e\u0431\u043e\u043c \u0443\u0434\u043e\u0431\u043d\u043e\u043c \u0434\u043b\u044f \u0432\u0430\u0441 \u044f\u0437\u044b\u043a\u0435. \u041d\u0430\u043a\u043e\u043d\u0435\u0446 \u0432 <code>Deploy redirect<\/code> \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u044e \u0437\u0430\u043b\u0438\u0432\u043a\u0443 \u0433\u043e\u0442\u043e\u0432\u043e\u0433\u043e \u0440\u0435\u0434\u0438\u0440\u0435\u043a\u0442\u0430 \u0432 \u043a\u043e\u0440\u0435\u043d\u044c gh-pages. \u0422\u043e \u0435\u0441\u0442\u044c \u043d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0435\u043c \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043e\u0442\u043a\u0443\u0434\u0430 \u0431\u0443\u0434\u0435\u043c \u0434\u0435\u043f\u043b\u043e\u0438\u0442\u044c<\/p>\n<pre><code class=\"yaml\">publish_dir: docs\/redirect\/ <\/code><\/pre>\n<h3>\u0414\u043e\u043f\u0438\u043b\u0438\u0432\u0430\u0435\u043c workflow<\/h3>\n<p>\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043c \u0442\u0435\u043f\u0435\u0440\u044c \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044e, \u043f\u0440\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0443 \u043d\u0430\u0441 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0437\u0430\u043f\u0443\u0449\u0435\u043d workflow (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0432 \u0440\u0443\u0447\u043d\u0443\u044e) \u0434\u043b\u044f \u0434\u0435\u043f\u043b\u043e\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u043d\u0435 \u0441\u0430\u043c\u043e\u0439 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 (\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043d\u0443\u0436\u043d\u043e, \u0447\u0442\u043e-\u0442\u043e \u043e\u0442\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u043a \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u0439 \u043f\u0440\u043e\u0435\u043a\u0442\u0430). \u0422\u043e\u0433\u0434\u0430 \u043f\u043e\u0441\u043b\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f, \u0432 \u0440\u0435\u0434\u0438\u0440\u0435\u043a\u0442\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u0441\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u043d\u0430 \u043d\u0435 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u0443\u044e. \u041e\u043f\u044f\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u043c \u043d\u0430\u0448 docs.yaml<\/p>\n<details class=\"spoiler\">\n<summary>\u0444\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 docs.yaml<\/summary>\n<div class=\"spoiler__content\">\n<pre><code>name: Docs  on:   push:     branches: [ main ]     tags:       - 'v*.*.*'  permissions:     contents: write  jobs:   docs-check:     runs-on: ubuntu-latest     steps:       - uses: actions\/checkout@v3         continue-on-error: true         with:           ref: gh-pages       - name: Check gh-pages versions         uses: jannekem\/run-python-script-action@v1         id: script         with:           script: |             import pathlib             import re              from packaging.version import parse, InvalidVersion                          current_version, path = parse(\"${{ github.ref_name }}\"), \".\/\"                          with pathlib.Path(path) as dir:                 for file in dir.iterdir():                     if file.is_dir():                         try:                             last_version = parse(file.name)                             if current_version &lt;= last_version:                                 set_output('is_new_version_docs', 'false')                                 exit()                          except InvalidVersion:                             pass                          set_output('is_new_version_docs', 'true')     outputs:       is_new_version_docs: ${{ steps.script.outputs.is_new_version_docs }}    docs-gen:     needs: docs-check     runs-on: ubuntu-latest     steps:       - uses: actions\/checkout@v3         with:           fetch-depth: 1       - uses: actions\/setup-python@v3         with:           python-version: 3.7       - name: Install dependencies         run: |           pip install -r docs\/requirements.txt       - name: Sphinx build         run: |           sphinx-build docs\/source docs\/_build       - name: Deploy docs         uses: peaceiris\/actions-gh-pages@v3         with:           allow_empty_commit: true           destination_dir: .\/${{ github.ref_name }}           force_orphan: false           keep_files: true           personal_token: ${{ secrets.DEPLOY_TOKEN }}           publish_branch: gh-pages           publish_dir: docs\/_build\/       - name: Change redirect         if: needs.docs-check.outputs.is_new_version_docs == 'true'         uses: jannekem\/run-python-script-action@v1         id: script         with:           script: |             import re                          path, pattern = \"docs\/redirect\/index.html\", re.compile(r\"\\{\\s*%\\s*latest-version\\s*%\\s*}\")              with open(path, \"r\", encoding=\"utf8\") as file:                 content = pattern.sub(\"${{ github.ref_name }}\", file.read())              with open(path, \"w+\", encoding=\"utf8\") as file:                 file.write(content)       - name: Deploy redirect         if: needs.docs-check.outputs.is_new_version_docs == 'true'         uses: peaceiris\/actions-gh-pages@v3         with:           allow_empty_commit: true           force_orphan: false           keep_files: true           personal_token: ${{ secrets.DEPLOY_TOKEN }}           publish_branch: gh-pages           publish_dir: docs\/redirect\/ <\/code><\/pre>\n<\/div>\n<\/details>\n<p>\u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u0437\u0434\u0435\u0441\u044c \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0435\u0449\u0435 \u043e\u0434\u043d\u0443 \u0434\u0436\u043e\u0431\u0443 <code>docs-check<\/code> \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0438 \u0431\u0443\u0434\u0435\u0442 \u043b\u0435\u0436\u0430\u0442\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0430 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u043b\u0438\u0432\u0430\u0435\u043c\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438. \u0414\u0435\u043b\u0430\u044e \u044d\u0442\u043e \u043a\u0430\u043a \u043e\u0431\u044b\u0447\u043d\u043e \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430\u043c\u0438 \u043b\u044e\u0431\u0438\u043c\u043e\u0433\u043e Python&#8217;\u0430 \ud83d\ude42 \u0417\u0434\u0435\u0441\u044c \u043e\u0442\u043c\u0435\u0447\u0443 \u0434\u0430\u043d\u043d\u044b\u0439 \u0448\u0430\u0433<\/p>\n<pre><code class=\"yaml\">- uses: actions\/checkout@v3   continue-on-error: true   with:     ref: gh-pages <\/code><\/pre>\n<p>\u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0441\u0442\u0430\u0432\u043b\u044e <code>continue-on-error: true<\/code> \u0447\u0442\u043e \u0431\u044b \u0447\u0435\u043a\u0430\u0443\u0442 \u043d\u0435 \u043f\u0440\u043e\u0432\u0430\u043b\u0438\u0432\u0430\u043b\u0441\u044f \u043f\u0440\u0438 \u043f\u0435\u0440\u0432\u043e\u043c \u0434\u0435\u043f\u043b\u043e\u0435, \u043a\u043e\u0433\u0434\u0430 \u0435\u0449\u0435 \u043c\u043e\u0436\u0435\u0442 \u043d\u0435 \u0431\u044b\u0442\u044c \u0432\u0435\u0442\u043a\u0438 gh-pages. \u0422\u0430\u043a\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e <code>ref: gh-pages<\/code> \u0442\u0430\u043a \u043a\u0430\u043a \u043d\u0443\u0436\u043d\u0430 \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u0430 \u0432\u0435\u0442\u043a\u0430 \u0441 \u0434\u043e\u043a\u0430\u043c\u0438.<\/p>\n<p>\u041f\u043e \u0441\u0443\u0442\u0438, \u0432 \u0434\u0430\u043d\u043d\u043e\u0439 \u0434\u0436\u043e\u0431\u0435 \u044f \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0430\u0440\u0441\u044e \u0432\u0435\u0442\u043a\u0443 gh-pages \u043d\u0430 \u043f\u0440\u0435\u0434\u043c\u0435\u0442 \u043d\u0430\u043b\u0438\u0447\u0438\u044f \u0432 \u043d\u0435\u0439 \u043f\u0430\u043f\u043a\u0438 \u0441 \u0431\u043e\u043b\u0435\u0435 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0435\u0439. \u041f\u043e \u0438\u0442\u043e\u0433\u0443 \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u044e output <code>is_new_version_docs<\/code> \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u0437\u0430 \u0441\u0435\u0431\u044f (\u0432 \u043d\u0451\u043c \u0431\u0443\u0434\u0435\u0442 \u043b\u0435\u0436\u0430\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u043e\u0439 \u043b\u0438\u0431\u043e <code>true<\/code>, \u043b\u0438\u0431\u043e <code>false<\/code>).<\/p>\n<p>\u041d\u0430\u043a\u043e\u043d\u0435\u0446 \u0432 \u043d\u0430\u0448\u0443 \u043f\u0435\u0440\u0432\u043e\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u0443\u044e \u0434\u0436\u043e\u0431\u0443 <code>docs-gen<\/code> \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0442\u0440\u043e\u0447\u043a\u0443<\/p>\n<pre><code class=\"yaml\">needs: docs-check <\/code><\/pre>\n<p>\u0447\u0442\u043e \u0431\u044b \u043e\u043d\u0430 \u043e\u0436\u0438\u0434\u0430\u043b\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0434\u0436\u043e\u0431\u044b, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0443\u0441\u043b\u043e\u0432\u0438\u0435<\/p>\n<pre><code class=\"yaml\">if: needs.docs-check.outputs.is_new_version_docs == 'true' <\/code><\/pre>\n<p>\u0432 \u0448\u0430\u0433\u0438 <code>Change redirect<\/code> \u0438 <code>Deploy redirect<\/code>.<\/p>\n<h3>\u041f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044c \u0432\u0435\u0440\u0441\u0438\u0439<\/h3>\n<p>\u0414\u0430\u043d\u043d\u044b\u0439 \u0440\u0430\u0437\u0434\u0435\u043b \u0441\u043a\u043e\u0440\u0435\u0435 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0441\u044f \u043a Sphinx, \u043e\u0434\u043d\u0430\u043a\u043e \u044f \u0434\u043e\u043b\u0436\u0435\u043d \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u044c. \u041d\u0430 \u0441\u0430\u0439\u0442\u0435 \u043d\u0430\u043c \u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0438\u043c\u0435\u0442\u044c \u043a\u0440\u0430\u0441\u0438\u0432\u0443\u044e &#171;\u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u043b\u043a\u0443&#187; \u043c\u0435\u0436\u0434\u0443 \u0432\u0435\u0440\u0441\u0438\u044f\u043c\u0438. \u0418\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u044f \u0434\u0443\u043c\u0430\u043b \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <a href=\"https:\/\/github.com\/Holzhaus\/sphinx-multiversion\" rel=\"noopener noreferrer nofollow\">sphinx-multiversion<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432 \u043d\u0443\u0436\u043d\u043e\u043c \u0441\u0442\u0438\u043b\u0435 \u043f\u0440\u0438 \u0441\u0431\u043e\u0440\u043a\u0435 \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u044d\u0442\u0443 \u0441\u0430\u043c\u0443\u044e &#171;\u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u043b\u043a\u0443&#187;. \u041e\u0434\u043d\u0430\u043a\u043e \u043e\u0442\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u043e\u0442 \u044d\u0442\u043e\u0433\u043e, \u0442\u0430\u043a \u043a\u0430\u043a sphinx-multiversion \u043f\u0440\u0438 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0438 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044f \u0432\u0435\u0440\u0441\u0438\u0439 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u0435\u0440\u0441\u0438\u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442 \u0432 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442. \u0418 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0431\u044b \u0432\u0441\u0435\u0433\u0434\u0430 \u0432\u0441\u0435 \u043f\u0435\u0440\u0435\u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u0441 \u043d\u0443\u043b\u044f, \u0430 \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u0442\u044c (\u0438\u043c\u0438\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c) \u0441\u0431\u043e\u0440\u043a\u0443 \u043d\u0443\u0436\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u043e\u043d \u043d\u0435 \u0443\u043c\u0435\u0435\u0442 (\u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u043e\u0431\u0441\u0443\u0436\u0434\u0430\u0435\u0442\u0441\u044f, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <a href=\"https:\/\/github.com\/Holzhaus\/sphinx-multiversion\/issues\/63\" rel=\"noopener noreferrer nofollow\">\u0437\u0434\u0435\u0441\u044c<\/a>). \u0422\u043e \u0435\u0441\u0442\u044c \u0435\u0441\u043b\u0438 \u0431\u0443\u0434\u0435\u0442 \u043e\u0433\u0440\u043e\u043c\u043d\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u0441 \u043a\u0443\u0447\u0435\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0435\u0439 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438, \u0442\u043e \u0441\u0431\u043e\u0440\u043e\u0447\u043a\u0430 \u043c\u044f\u0433\u043a\u043e \u0433\u043e\u0432\u043e\u0440\u044f \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0437\u0430\u0442\u044f\u043d\u0435\u0442\u0441\u044f. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u043b\u0435\u0434\u0443\u044f <a href=\"https:\/\/github.com\/Holzhaus\/sphinx-multiversion\/pull\/64#issuecomment-905291959\" rel=\"noopener noreferrer nofollow\">\u043e\u0442\u0432\u0435\u0442\u0443<\/a> \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0444\u0430\u0439\u043b <code>docs\/source\/_templates\/layout.html<\/code><\/p>\n<pre><code>{% extends \"!layout.html\" %} {% block menu %}   &lt;style>     \/* style mobile top nav to look like main nav *\/     .wy-nav-top {         background: {{ theme_style_nav_header_background }}     }   &lt;\/style>   {{ super() }}   &lt;!-- Add versions for selected branches + tags -->   &lt;p class=\"caption\">&lt;span class=\"caption-text\">Versions:&lt;\/span>&lt;\/p>   &lt;ul id=\"versions\"\/>   &lt;script>     \/\/ Add any branches to appear in the side pane here, tags will be added below     \/\/ Will only appear if docs are built and pushed in gh-pages     var versions = ['master', 'main'];     var dirs = new Set();     function addVersion(name) {       if (dirs.has(name)) {         var li = document.createElement(\"li\");         var a = document.createElement(\"a\");         a.href = 'https:\/\/username.github.io\/{{ project }}\/' + name;         a.innerText = name;         li.appendChild(a)         document.getElementById('versions').appendChild(li);       }     }     Promise.all([       \/\/ Find gh-pages directories and populate `dirs`       fetch(\"https:\/\/api.github.com\/repos\/username\/{{ project }}\/contents?ref=gh-pages\")       .then(response => response.json())       .then(data => data.forEach(function(e) {         if (e.type == \"dir\") dirs.add(e.name);       })),       \/\/ Add tags to `versions`       fetch('https:\/\/api.github.com\/repos\/reponame\/{{ project }}\/tags')         .then(response => response.json())         .then(data => data.forEach(function(e) {           versions.push(e.name);         }))       ]).then(_ => versions.forEach(addVersion))   &lt;\/script> {% endblock %} <\/code><\/pre>\n<p>\u0430 \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u043c \u0444\u0430\u0439\u043b\u0435 <code>conf.py<\/code> Sphinx&#8217;\u0430 \u043d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0435\u043c \u0443\u043a\u0430\u0437\u0430\u0442\u044c<\/p>\n<pre><code class=\"python\">templates_path = ['_templates'] <\/code><\/pre>\n<h3>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h3>\n<p>\u041e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0432 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u043e\u0445\u0432\u0430\u0442\u0438\u043b \u043d\u0435 \u0432\u0441\u0435 \u043e \u0447\u0435\u043c \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c. \u041c\u0443\u043b\u044c\u0442\u0438\u044f\u0437\u044b\u0447\u043d\u0430\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f &#8212; \u043f\u0440\u043e\u0438\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u043c\u043d\u043e\u044e, \u0442\u0430\u043a \u043a\u0430\u043a \u0434\u043b\u044f \u043c\u043e\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u0438 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u0432 \u043e\u0434\u043d\u043e\u043c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0435 &#8212; \u0432 \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u043e\u043c. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0432 \u0431\u0443\u0434\u0443\u0449\u0435\u043c \u0432\u0435\u0440\u043d\u0443\u0441\u044c \u043a \u0434\u0430\u043d\u043d\u043e\u043c\u0443 \u0432\u043e\u043f\u0440\u043e\u0441\u0443, \u043c\u043e\u0436\u0435\u0442 \u0434\u0430\u0436\u0435 \u0435\u0449\u0435 \u043e\u0434\u043d\u0443 \u0441\u0442\u0430\u0442\u044c\u044e \u043d\u0430\u043f\u0438\u0448\u0443 \ud83d\ude42<\/p>\n<p>\u041d\u0430\u0434\u0435\u044e\u0441\u044c \u0431\u044b\u043b\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u0438 \u043f\u043e\u043b\u0435\u0437\u043d\u043e. \u0412\u0441\u0435\u043c \u0441\u043f\u0430\u0441\u0438\u0431\u043e!<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/760292\/\"> https:\/\/habr.com\/ru\/articles\/760292\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041d\u0435\u0434\u0430\u0432\u043d\u043e \u043c\u043d\u0435 \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u043e\u0441\u044c \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0438 \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e \u0434\u043b\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u0437 \u0441\u0432\u043e\u0438\u0445 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u043d\u0430 Python. \u041d\u0430\u043f\u0438\u0441\u0430\u043b \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e, \u0441\u043e\u0431\u0440\u0430\u043b Sphinx&#8217;\u043e\u043c, \u0434\u0430\u043b\u044c\u0448\u0435 \u0441\u043e\u0431\u0440\u0430\u043b\u0441\u044f \u0437\u0430\u043b\u0438\u0432\u0430\u0442\u044c \u043d\u0430 <a href=\"https:\/\/readthedocs.org\" rel=\"noopener noreferrer nofollow\">readthedocs.org<\/a> \u0438 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b \u0447\u0442\u043e \u0431\u0435\u0437 VPN \u0441\u0430\u0439\u0442 \u043d\u0435 \u0430\u043b\u0451. \u0411\u043e\u043b\u0435\u0435 \u0442\u043e\u0433\u043e, \u043f\u043e\u0447\u0435\u043c\u0443 \u0442\u043e \u0438 \u0441 VPN \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u043b\u043e\u0441\u044c \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u0441 GitHub.<\/p>\n<p>\u041d\u0435 \u0434\u043e\u043b\u0433\u043e \u0434\u0443\u043c\u0430\u044f, \u0440\u0435\u0448\u0438\u043b \u0438\u0437\u0443\u0447\u0438\u0442\u044c \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044e \u043d\u0430 &#171;\u0440\u044b\u043d\u043a\u0435&#187; \u0438 \u043d\u0430\u0448\u0435\u043b \u043d\u0435\u043f\u043b\u043e\u0445\u0443\u044e \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u0443 &#8212; GitHub Pages. \u042d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u044f \u0434\u0435\u043f\u043b\u043e\u0438\u043b \u043c\u0443\u043b\u044c\u0442\u0438\u0432\u0435\u0440\u0441\u0438\u043e\u043d\u043d\u0443\u044e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e \u043d\u0430 GitHub Pages c \u043f\u043e\u043c\u043e\u0449\u044c\u044e GitHub Actions (\u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0432\u044b \u0445\u043e\u0442\u044f \u0431\u044b \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u043a\u043e\u043c\u044b \u0441 \u0434\u0430\u043d\u043d\u043e\u0439 \u0444\u0438\u0447\u0435\u0439) \u0438 \u0441\u0432\u043e\u0438\u043c\u0438 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c\u0438 &#171;\u043a\u043e\u0441\u0442\u044b\u043b\u044f\u043c\u0438&#187;.<\/p>\n<h3>\u041f\u0438\u0448\u0435\u043c \u0441\u0442\u0430\u0440\u0442\u043e\u0432\u044b\u0439 workflow<\/h3>\n<p>\u0414\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430, \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u043e\u0435\u043a\u0442 \u0441\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043e\u0431\u0449\u0435\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043e\u0439:<\/p>\n<pre><code>.github\/     workflows\/         ... docs\/     requirements.txt     source\/         ...     ... src\/     ... LICENSE README.md ... <\/code><\/pre>\n<p>\u0412 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 <code>docs\/source<\/code> \u043b\u0435\u0436\u0430\u0442 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438 \u0431\u0443\u0434\u0443\u0449\u0435\u0433\u043e \u0441\u0430\u0439\u0442\u0430 Sphinx&#8217;\u043e\u043c, \u0432 <code>docs\/requirements.txt<\/code> \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 (sphinx, &#8230;). \u0412\u043e\u043e\u0431\u0449\u0435 \u0433\u043e\u0432\u043e\u0440\u044f, Sphinx \u0432 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043d\u0435 \u043f\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443, \u0442\u043e \u0435\u0441\u0442\u044c \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u0440\u0443\u0433\u0438\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438 \u0434\u043e\u043a\u043e\u0432 (\u0434\u0430 \u0438 \u043f\u0440\u043e\u0435\u043a\u0442 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0435 \u043d\u0430 Python).<\/p>\n<p>\u0414\u043b\u044f \u0434\u0435\u043f\u043b\u043e\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438, \u0433\u043b\u0430\u0432\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <a href=\"https:\/\/github.com\/peaceiris\/actions-gh-pages\" rel=\"noopener noreferrer nofollow\">peaceiris\/actions-gh-pages<\/a>. \u0414\u0430\u043d\u043d\u044b\u0439 \u044d\u043a\u0448\u043e\u043d \u0432 \u0432\u044b\u0431\u0440\u0430\u043d\u0443\u044e \u0432\u0435\u0442\u043a\u0443 (\u043f\u043e \u0434\u0435\u0444\u043e\u043b\u0442\u0443 \u044d\u0442\u043e <code>gh-pages<\/code>) \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043b\u0438\u0432\u0430\u0442\u044c \u0441\u043e\u0431\u0440\u0430\u043d\u043d\u044b\u0439 \u0441\u0430\u0439\u0442 \u0441 \u0434\u043e\u043a\u0430\u043c\u0438. \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u043c\u043e\u0436\u043d\u043e \u0441\u043b\u0438\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u0432 \u043f\u0430\u043f\u043a\u0443 <code>docs<\/code> \u0432\u0435\u0442\u043a\u0438 <code>main<\/code>, \u043d\u043e \u043f\u043e-\u043c\u043e\u0435\u043c\u0443 \u043e\u0442\u0434\u0435\u043b\u044f\u0442\u044c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e \u043e\u0442 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043a\u0443\u0434\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u043d\u0435\u0435.<\/p>\n<p>\u041d\u0430\u043f\u0438\u0448\u0435\u043c \u0442\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0448 \u0441\u0442\u0430\u0440\u0442\u043e\u0432\u044b\u0439 workflow \u0434\u043b\u044f \u0434\u0435\u043f\u043b\u043e\u044f \u0434\u043e\u043a\u043e\u0432. \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0444\u0430\u0439\u043b\u0438\u043a <code>docs.yaml<\/code> \u0432 \u043f\u0430\u043f\u043a\u0435 <code>.github\/workflows<\/code>:<\/p>\n<details class=\"spoiler\">\n<summary>\u0441\u0442\u0430\u0440\u0442\u043e\u0432\u044b\u0439 docs.yaml<\/summary>\n<div class=\"spoiler__content\">\n<pre><code>name: Docs  on:   push:     branches: [ main ]     tags:       - 'v*.*.*'  permissions:     contents: write  jobs:   docs-gen:     runs-on: ubuntu-latest     steps:       - uses: actions\/checkout@v3         with:           fetch-depth: 1       - uses: actions\/setup-python@v3         with:           python-version: 3.7       - name: Install dependencies         run: |           pip install -r docs\/requirements.txt       - name: Sphinx build         run: |           sphinx-build docs\/source docs\/_build       - name: Deploy docs         uses: peaceiris\/actions-gh-pages@v3         with:           allow_empty_commit: true           personal_token: ${{ secrets.DEPLOY_TOKEN }}           publish_branch: gh-pages           publish_dir: docs\/_build\/ <\/code><\/pre>\n<\/div>\n<\/details>\n<p>\u0418\u0442\u0430\u043a, \u0447\u0442\u043e \u0437\u0434\u0435\u0441\u044c \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442? \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u043e \u0448\u0430\u0433\u0430\u043c. \u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u0442\u0440\u0438\u0433\u0435\u0440 \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043d\u0430\u0448\u0435\u0433\u043e workflow:<\/p>\n<pre><code class=\"yaml\">on:   push:     branches: [ main ]     tags:       - 'v*.*.*' <\/code><\/pre>\n<p>\u042f \u0432\u044b\u0431\u0440\u0430\u043b \u0432\u0430\u0440\u0438\u0430\u043d\u0442 c push&#8217;\u0435\u043c \u0442\u0430\u0433\u0430 \u0432 \u0433\u043b\u0430\u0432\u043d\u0443\u044e \u0432\u0435\u0442\u043a\u0443 main, \u0447\u0442\u043e \u0432 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435 \u043b\u043e\u0433\u0438\u0447\u043d\u043e, \u0442\u0430\u043a \u0434\u0435\u043f\u043b\u043e\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442\u044c \u043f\u0440\u0438 \u0442\u0430\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u043d\u043e\u0432\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u041a\u0430\u043a \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u0432\u043e\u043e\u0431\u0449\u0435 \u043f\u0440\u0438 \u0441\u0440\u0435\u0437\u0435 \u0440\u0435\u043b\u0438\u0437\u0430<\/p>\n<pre><code class=\"yaml\">on:   release:     types: [ created ] <\/code><\/pre>\n<p>\u0438\u043b\u0438 \u043f\u0440\u0438 \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0432 \u043b\u044e\u0431\u043e\u0439 \u043c\u043e\u043c\u0435\u043d\u0442<\/p>\n<pre><code class=\"yaml\">on:   workflow_dispatch:     inputs:       ... <\/code><\/pre>\n<p>\u0412 \u0431\u043b\u043e\u043a\u0435 <code>permissions<\/code> \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u043f\u0440\u0430\u0432\u0430 \u043d\u0430 \u0437\u0430\u043f\u0438\u0441\u044c. \u041d\u0430\u043a\u043e\u043d\u0435\u0446 \u0432 \u043d\u0430\u0448\u0435\u0439 \u0434\u0436\u043e\u0431\u0435 <code>docs-gen<\/code> \u0441\u0442\u0430\u0432\u0438\u043c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0438\u0437 <code>docs\/requirements.txt<\/code> \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c sphinx:<\/p>\n<pre><code class=\"yaml\">- name: Sphinx build   run: |     sphinx-build docs\/source docs\/_build <\/code><\/pre>\n<p>\u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442 \u0434\u043e\u043a\u0438 \u0432 \u043f\u0430\u043f\u043e\u0447\u043a\u0443 <code>docs\/_build<\/code>.<\/p>\n<h3>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u044d\u043a\u0448\u043e\u043d actions-gh-pages<\/h3>\n<pre><code class=\"yaml\">- name: Deploy docs   uses: peaceiris\/actions-gh-pages@v3   with:     allow_empty_commit: true     personal_token: ${{ secrets.DEPLOY_TOKEN }}     publish_branch: gh-pages     publish_dir: docs\/_build\/ <\/code><\/pre>\n<p>\u0414\u0430\u043d\u043d\u044b\u0439 \u044d\u043a\u0448\u043e\u043d \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0435\u0441\u043b\u043e\u0436\u043d\u043e, \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0432\u0448\u0438\u0441\u044c \u0441\u0442\u0430\u0440\u0442\u043e\u0432\u044b\u043c \u043c\u0430\u043d\u0443\u0430\u043b\u043e\u043c \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0436\u0435\u043b\u0430\u0435\u043c\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442. \u041e\u0434\u043d\u0430\u043a\u043e, \u0435\u0441\u0442\u044c \u043d\u044e\u0430\u043d\u0441 \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u044f \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u0441\u044f. \u042d\u0442\u043e <code>personal_token<\/code>. \u041f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0433\u043e <code>GITHUB_TOKEN<\/code>, \u0442\u043e \u0435\u0441\u0442\u044c<\/p>\n<pre><code class=\"yaml\">github_token: ${{ secrets.GITHUB_TOKEN }} <\/code><\/pre>\n<p>\u0441\u043c\u0435\u043b\u043e \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u043b\u0435\u0442\u0435\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0430 \u0442\u0438\u043f\u0430 \u044d\u0442\u043e\u0439:<\/p>\n<pre><code>remote: error: GH006: Protected branch update failed for refs\/heads\/master. remote: error: Cannot force-push to this protected branch <\/code><\/pre>\n<p>\u0412 \u043c\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0443 \u043c\u0435\u043d\u044f \u0431\u044b\u043b\u0430 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430 \u0437\u0430\u0449\u0438\u0442\u0430 \u043d\u0430 \u0432\u0435\u0442\u043a\u0438, \u0438 GITHUB_TOKEN&#8217;\u0443 \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u043b\u043e \u043f\u0440\u0430\u0432 \u0434\u043b\u044f force push&#8217;\u0430. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u043e\u0437\u0434\u0430\u0435\u043c <em>PAT<\/em> (<em>Personal Access Token<\/em>) \u0441 \u043d\u0443\u0436\u043d\u044b\u043c\u0438 \u043f\u0440\u0430\u0432\u0430\u043c\u0438, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0435\u0433\u043e \u0432 \u0441\u0435\u043a\u0440\u0435\u0442\u044b (<code>secrets.DEPLOY_TOKEN<\/code>) \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c.<br \/> \u0412 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u043c \u043a\u0430\u043a\u0438\u0445-\u0442\u043e \u0441\u0438\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u043d\u0435 \u0431\u044b\u043b\u043e.<\/p>\n<h3>\u0412\u043a\u043b\u044e\u0447\u0430\u0435\u043c GitHub Pages<\/h3>\n<p>\u0418\u0434\u0435\u043c \u0432 <em>settings<\/em> \u043d\u0430\u0448\u0435\u0433\u043e \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f \u0438 \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 <em>Code and automation<\/em> \u0436\u043c\u0435\u043c \u043d\u0430 <em>Pages<\/em>. \u0412 \u043f\u043e\u0434\u0440\u0430\u0437\u0434\u0435\u043b\u0435 <em>Source<\/em> \u0440\u0430\u0437\u0434\u0435\u043b\u0430 <em>Build and deployment<\/em> \u0432\u044b\u0431\u0438\u0440\u0430\u044e <code>Deploy from a branch<\/code>, \u0430 \u0432 \u043f\u043e\u0434\u0440\u0430\u0437\u0434\u0435\u043b\u0435 <em>Branch<\/em> \u0432\u044b\u0431\u0438\u0440\u0430\u044e \u0432\u0435\u0442\u043a\u0443 <code>gh-pages<\/code> \u0438 \u043c\u0435\u0441\u0442\u043e <code>\/root<\/code> \u043e\u0442\u043a\u0443\u0434\u0430 \u0431\u0443\u0434\u0443\u0442 \u0433\u0440\u0443\u0437\u0438\u0442\u044c\u0441\u044f \u0434\u043e\u043a\u0438. \u0422\u0435\u043f\u0435\u0440\u044c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u0433\u0440\u0443\u0437\u0438\u0442\u044c\u0441\u044f \u0438\u0437 \u043a\u043e\u0440\u043d\u044f gh-pages.<\/p>\n<p>\u0412 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435 \u043d\u0430 \u044d\u0442\u043e\u043c \u0438 \u0432\u0441\u0435 \u0441 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u043e\u0439 GitHub Pages. \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u0438 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438 \u043d\u0430\u0448\u0435\u0433\u043e workflow <code>Docs<\/code>, \u043f\u043e\u0441\u043b\u0435 \u0431\u0443\u0434\u0435\u0442 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u043e\u043c \u0437\u0430\u043f\u0443\u0449\u0435\u043d GitHub Pages&#8217;\u043e\u0432\u0441\u043a\u0438\u0439 workflow <code>pages-build-deployment<\/code> \u0438 \u0441\u0442\u0430\u043d\u0435\u0442 \u0430\u043a\u0442\u0438\u0432\u043d\u044b\u043c \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u0441\u0430\u0439\u0442. \u041f\u0435\u0440\u0435\u0439\u0434\u044f \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435 \u0442\u0438\u043f\u0430 <a href=\"https:\/\/username.github.io\/reponame\/\" rel=\"noopener noreferrer nofollow\"><em>https:\/\/username.github.io\/reponame\/<\/em><\/a> \u0441\u043c\u043e\u0436\u0435\u043c \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442.<\/p>\n<h3>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u043c\u0443\u043b\u044c\u0442\u0438\u0432\u0435\u0440\u0441\u0438\u043e\u043d\u043d\u043e\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/h3>\n<p>\u0412\u0441\u0435 \u0431\u044b \u0445\u043e\u0440\u043e\u0448\u043e, \u043d\u043e \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043c\u044b \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u043e, \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u043f\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u043c \u043d\u043e\u0432\u043e\u043c \u0434\u0435\u043f\u043b\u043e\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0432\u0441\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 gh-pages \u0438 \u043f\u043e \u0438\u0442\u043e\u0433\u0443 \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0432\u0438\u0434\u0435\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e \u0434\u043b\u044f \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u0432 \u0442\u043e \u0432\u0440\u0435\u043c\u044f \u043a\u0430\u043a \u0434\u043b\u044f \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u0432\u0435\u0440\u0441\u0438\u0439 \u0432\u0441\u0435 \u0431\u0443\u0434\u0435\u0442 \u0441\u0442\u0435\u0440\u0442\u043e. \u041a\u043e\u043d\u0435\u0447\u043d\u043e \u043d\u0430\u0441 \u044d\u0442\u043e \u043d\u0435 \u0443\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442.<\/p>\n<p>\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u043c \u043d\u0430\u0448 workflow.<\/p>\n<details class=\"spoiler\">\n<summary>\u043f\u0440\u043e\u043a\u0430\u0447\u0435\u043d\u043d\u044b\u0439 docs.yaml<\/summary>\n<div class=\"spoiler__content\">\n<pre><code>name: Docs  on:   push:     branches: [ main ]     tags:       - 'v*.*.*'  permissions:     contents: write  jobs:   docs-gen:     runs-on: ubuntu-latest     steps:       - uses: actions\/checkout@v3         with:           fetch-depth: 1       - uses: actions\/setup-python@v3         with:           python-version: 3.7       - name: Install dependencies         run: |           pip install -r docs\/requirements.txt       - name: Sphinx build         run: |           sphinx-build docs\/source docs\/_build       - name: Deploy docs         uses: peaceiris\/actions-gh-pages@v3         with:           allow_empty_commit: true           destination_dir: .\/${{ github.ref_name }}           force_orphan: false           keep_files: true           personal_token: ${{ secrets.DEPLOY_TOKEN }}           publish_branch: gh-pages           publish_dir: docs\/_build\/       - name: Change redirect         uses: jannekem\/run-python-script-action@v1         id: script         with:           script: |             import re                          path, pattern = \"docs\/redirect\/index.html\", re.compile(r\"\\{\\s*%\\s*latest-version\\s*%\\s*}\")              with open(path, \"r\", encoding=\"utf8\") as file:                 content = pattern.sub(\"${{ github.ref_name }}\", file.read())              with open(path, \"w+\", encoding=\"utf8\") as file:                 file.write(content)       - name: Deploy redirect         uses: peaceiris\/actions-gh-pages@v3         with:           allow_empty_commit: true           force_orphan: false           keep_files: true           personal_token: ${{ secrets.DEPLOY_TOKEN }}           publish_branch: gh-pages           publish_dir: docs\/redirect\/ <\/code><\/pre>\n<\/div>\n<\/details>\n<p>\u0421\u0442\u0430\u0432\u0438\u043c<\/p>\n<pre><code class=\"yaml\">destination_dir: .\/${{ github.ref_name }} <\/code><\/pre>\n<p>\u0447\u0442\u043e \u0431\u044b \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u0433\u0440\u0443\u0437\u0438\u043b\u0430\u0441\u044c \u043d\u0435 \u0432 \u043a\u043e\u0440\u0435\u043d\u044c \u0432\u0435\u0442\u043a\u0438 gh-pages, \u0430 \u0432 \u043f\u0430\u043f\u043a\u0443 \u0441 \u0438\u043c\u0435\u043d\u0435\u043c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0433\u043e \u0442\u0430\u0433\u0430. \u0412 \u0438\u0442\u043e\u0433\u0435 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043a\u0430\u043a-\u0442\u043e \u0442\u0430\u043a:<\/p>\n<pre><code>v0.1.0\/     ... v0.2.0\/     ... ... <\/code><\/pre>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c<\/p>\n<pre><code class=\"yaml\">keep_files: true <\/code><\/pre>\n<p>\u0434\u043b\u044f \u043e\u0442\u043c\u0435\u043d\u044b \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u0438 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u0432 \u0432\u0435\u0442\u043a\u0435 gh-pages. \u041e\u0434\u043d\u0430\u043a\u043e \u043a\u0430\u043a \u0443\u043a\u0430\u0437\u0430\u043d\u043e \u0432 <a href=\"https:\/\/github.com\/peaceiris\/actions-gh-pages#%EF%B8%8F-keeping-existing-files-keep_files\" rel=\"noopener noreferrer nofollow\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/a>, actions-gh-pages \u0432\u0435\u0440\u0441\u0438\u044f 3 \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c <code>force_orphan<\/code>, \u043f\u043e\u044d\u0442\u043e\u043c\u0443<\/p>\n<pre><code class=\"yaml\">force_orphan: false <\/code><\/pre>\n<p>\u0418\u0442\u0430\u043a, \u0442\u0435\u043f\u0435\u0440\u044c \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0442\u0430\u0433\u0430 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u0438 \u043f\u043e\u043c\u0435\u0449\u0430\u0442\u044c\u0441\u044f \u043d\u0435 \u0432 \u043a\u043e\u0440\u0435\u043d\u044c gh-pages, \u0430 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0443\u044e \u043f\u0430\u043f\u043a\u0443 \u0441 \u0438\u043c\u0435\u043d\u0435\u043c \u044d\u0442\u043e\u0433\u043e \u0442\u0430\u0433\u0430. \u041d\u043e GitHub Pages \u0433\u0440\u0443\u0437\u0438\u0442 \u0441\u0430\u0439\u0442 \u0441 \u043a\u043e\u0440\u043d\u044f \u0432\u0435\u0442\u043a\u0438. \u0417\u043d\u0430\u0447\u0438\u0442 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u0440\u0435\u0434\u0438\u0440\u0435\u043a\u0442. \u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u0437\u0434\u0435\u0441\u044c \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u0442\u0443\u043f\u0438\u0442\u044c \u043f\u043e-\u0440\u0430\u0437\u043d\u043e\u043c\u0443. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u043e\u0436\u043d\u043e \u0432 \u0432\u0435\u0442\u043a\u0435 gh-pages \u0434\u0443\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0432 \u043f\u0430\u043f\u043a\u0443 \u0441 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c <code>main<\/code> \u0438 \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0432 \u043a\u043e\u0440\u0435\u043d\u044c \u0432\u0435\u0442\u043a\u0438 <code>index.html<\/code> \u0441\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u044b\u043c (\u0432\u0437\u044f\u0442\u043e \u043e\u0442 <a href=\"https:\/\/holzhaus.github.io\/sphinx-multiversion\/master\/github_pages.html#redirecting-from-the-document-root\" rel=\"noopener noreferrer nofollow\">\u0441\u044e\u0434\u0430<\/a>):<\/p>\n<pre><code>&lt;!DOCTYPE html> &lt;html>   &lt;head>     &lt;title>Redirecting to latest version\/&lt;\/title>     &lt;meta charset=\"utf-8\">     &lt;meta content=\"0; URL=https:\/\/username.github.io\/reponame\/main\/index.html\" http-equiv=\"refresh\">     &lt;link href=\"https:\/\/username.github.io\/reponame\/main\/index.html\" rel=\"canonical\">   &lt;\/head> &lt;\/html> <\/code><\/pre>\n<p>\u042f \u0436\u0435 \u043f\u043e\u0448\u0435\u043b \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0434\u0440\u0443\u0433\u0438\u043c \u043f\u0443\u0442\u0435\u043c. \u0412 \u043f\u0430\u043f\u043e\u0447\u043a\u0443 docs \u043d\u0430\u0448\u0435\u0433\u043e \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c <code>redirect\/index.html<\/code> \u0432\u0438\u0434\u0430:<\/p>\n<pre><code>&lt;!DOCTYPE html> &lt;html>   &lt;head>     &lt;title>Redirecting to latest-version\/&lt;\/title>     &lt;meta charset=\"utf-8\">     &lt;meta content=\"0; URL=https:\/\/username.github.io\/reponame\/{% latest-version %}\/index.html\" http-equiv=\"refresh\">     &lt;link href=\"https:\/\/username.github.io\/reponame\/{% latest-version %}\/index.html\" rel=\"canonical\">   &lt;\/head> &lt;\/html> <\/code><\/pre>\n<p>\u0430 \u0432 \u0434\u0436\u043e\u0431\u0443 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e 2 \u0448\u0430\u0433\u0430 &#8212; <code>Change redirect<\/code> \u0438 <code>Deploy redirect<\/code><\/p>\n<pre><code class=\"yaml\">- name: Change redirect   uses: jannekem\/run-python-script-action@v1   id: script   with:    script: |      import re           path, pattern = \"docs\/redirect\/index.html\", re.compile(r\"\\{\\s*%\\s*latest-version\\s*%\\s*}\")       with open(path, \"r\", encoding=\"utf8\") as file:          content = pattern.sub(\"${{ github.ref_name }}\", file.read())       with open(path, \"w+\", encoding=\"utf8\") as file:          file.write(content) - name: Deploy redirect   uses: peaceiris\/actions-gh-pages@v3   with:     allow_empty_commit: true     force_orphan: false     keep_files: true     personal_token: ${{ secrets.DEPLOY_TOKEN }}     publish_branch: gh-pages     publish_dir: docs\/redirect\/ <\/code><\/pre>\n<p>\u0412 <code>Change redirect<\/code> \u043f\u043e \u0441\u0443\u0442\u0438 \u044f \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u0432 \u0437\u0430\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0448\u0430\u0431\u043b\u043e\u043d, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043a\u0443 \u0438 Python. \u041f\u043e\u043d\u044f\u0442\u043d\u043e\u0435 \u0434\u0435\u043b\u043e \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0430 \u043b\u044e\u0431\u043e\u043c \u0443\u0434\u043e\u0431\u043d\u043e\u043c \u0434\u043b\u044f \u0432\u0430\u0441 \u044f\u0437\u044b\u043a\u0435. \u041d\u0430\u043a\u043e\u043d\u0435\u0446 \u0432 <code>Deploy redirect<\/code> \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u044e \u0437\u0430\u043b\u0438\u0432\u043a\u0443 \u0433\u043e\u0442\u043e\u0432\u043e\u0433\u043e \u0440\u0435\u0434\u0438\u0440\u0435\u043a\u0442\u0430 \u0432 \u043a\u043e\u0440\u0435\u043d\u044c gh-pages. \u0422\u043e \u0435\u0441\u0442\u044c \u043d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0435\u043c \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043e\u0442\u043a\u0443\u0434\u0430 \u0431\u0443\u0434\u0435\u043c \u0434\u0435\u043f\u043b\u043e\u0438\u0442\u044c<\/p>\n<pre><code class=\"yaml\">publish_dir: docs\/redirect\/ <\/code><\/pre>\n<h3>\u0414\u043e\u043f\u0438\u043b\u0438\u0432\u0430\u0435\u043c workflow<\/h3>\n<p>\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043c \u0442\u0435\u043f\u0435\u0440\u044c \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044e, \u043f\u0440\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0443 \u043d\u0430\u0441 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0437\u0430\u043f\u0443\u0449\u0435\u043d workflow (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0432 \u0440\u0443\u0447\u043d\u0443\u044e) \u0434\u043b\u044f \u0434\u0435\u043f\u043b\u043e\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u043d\u0435 \u0441\u0430\u043c\u043e\u0439 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 (\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043d\u0443\u0436\u043d\u043e, \u0447\u0442\u043e-\u0442\u043e \u043e\u0442\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u043a \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u0439 \u043f\u0440\u043e\u0435\u043a\u0442\u0430). \u0422\u043e\u0433\u0434\u0430 \u043f\u043e\u0441\u043b\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f, \u0432 \u0440\u0435\u0434\u0438\u0440\u0435\u043a\u0442\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u0441\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u043d\u0430 \u043d\u0435 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u0443\u044e. \u041e\u043f\u044f\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u043c \u043d\u0430\u0448 docs.yaml<\/p>\n<details class=\"spoiler\">\n<summary>\u0444\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 docs.yaml<\/summary>\n<div class=\"spoiler__content\">\n<pre><code>name: Docs  on:   push:     branches:<\/code><\/pre>\n<\/div>\n<\/details>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-354566","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/354566","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=354566"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/354566\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=354566"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=354566"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=354566"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}