@@ -47,14 +47,21 @@ jobs:
47
47
sudo apt-get update
48
48
sudo apt-get install -y --no-install-recommends python3-venv
49
49
50
- -name :Build doc
50
+ -name :Buildand publish doc
51
51
run :|
52
52
ref=${GITHUB_REF#refs/pull/}
53
- ref=${ref%/merge}
53
+ pr_num=${ref%/merge}
54
+ output_dir=build/html/${{ github.base_ref }}/${pr_num}
55
+
54
56
cd cpython/Doc
55
57
make venv
56
- make build ALLSPHINXOPTS="-b html -D language=ja -D gettext_compact=0 -E -d build/doctrees . ${{ github.workspace }}/build/html/${{ github.base_ref }}/${ref}"
58
+ rm -rf ${output_dir}
59
+ make build ALLSPHINXOPTS="-b html -D language=ja -D gettext_compact=0 -E -d build/doctrees . ${{ github.workspace }}/${output_dir}"
60
+ ls -l ${output_dir}
57
61
58
- -name :Publish PR build
59
- run :|
60
- ls -l build/html/*/*/*
62
+ cd build/html
63
+ git config --local user.name "Autobuild bot on GitHub Actions"
64
+ git config --local user.email "githubaction-build-bot@example.com"
65
+ git add ${output_dir}
66
+ git commit -m 'update html'
67
+ git push "https://${{ github.token }}@github.com/${{ github.repository }}.git" gh-pages:gh-pages