@@ -2,14 +2,16 @@ name: Build and Deploy to GitHub Pages
22
33on :
44 schedule :
5- - cron : ' 0 2 * * *'
5+ - cron : ' 0 2 * * *'
66 push :
77 branches :
88 - 3.14
99 workflow_dispatch :
1010
1111permissions :
12- contents : write
12+ contents : read
13+ pages : write
14+ id-token : write
1315
1416concurrency :
1517 group : " pages"
@@ -24,41 +26,52 @@ jobs:
2426 with :
2527 repository : python/cpython
2628 ref : v3.14.6
27-
29+
2830 - name : Set up Python
2931 uses : actions/setup-python@v4
3032 with :
3133 python-version : ' 3.12'
32-
34+
3335 - name : Setup virtual environment
3436 run : make venv
3537 working-directory : ./Doc
36-
38+
3739 - name : Checkout translation files
3840 uses : actions/checkout@v4
3941 with :
4042 path : Doc/locales/fa/LC_MESSAGES
4143
42- - name : Install gettext
43- run : sudo apt-get install -y gettext
44+ - name : Strip stray fuzzy markers
45+ run : python3 Doc/locales/fa/LC_MESSAGES/scripts/strip_fuzzy.py $(find Doc/locales/fa/LC_MESSAGES -name "*.po" -not -path "*/.git/*")
4446
4547 - name : Compile .po files to .mo
4648 run : |
47- find Doc/locales/fa/LC_MESSAGES -name "*.po" | while read f; do
49+ find Doc/locales/fa/LC_MESSAGES -name "*.po" -not -path "*/.git/*" | while read f; do
4850 msgfmt "$f" -o "${f%.po}.mo"
4951 done
5052
5153 - name : Setup problem matcher
5254 uses : sphinx-doc/github-problem-matcher@v1.1
53-
55+
5456 - name : Build documentation
5557 run : make -e SPHINXOPTS="--color -D language='fa' -D gettext_allow_fuzzy_translations=1 --keep-going" html
5658 working-directory : ./Doc
57-
58- - name : Deploy to gh-pages
59- uses : peaceiris/actions-gh-pages@v4
59+
60+ - name : Setup Pages
61+ uses : actions/configure-pages@v4
62+
63+ - name : Upload artifact
64+ uses : actions/upload-pages-artifact@v3
6065 with :
61- github_token : ${{ secrets.GITHUB_TOKEN }}
62- publish_dir : Doc/build/html
63- keep_files : true
64- enable_jekyll : false
66+ path : Doc/build/html
67+
68+ deploy :
69+ environment :
70+ name : github-pages
71+ url : ${{ steps.deployment.outputs.page_url }}
72+ runs-on : ubuntu-latest
73+ needs : build
74+ steps :
75+ - name : Deploy to GitHub Pages
76+ id : deployment
77+ uses : actions/deploy-pages@v4
0 commit comments