Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ cd cpython/Doc || exit 1
mkdir -p locales/"$LOCALE"/
ln -sfn "$(realpath ../../docs)" locales/"$LOCALE"/LC_MESSAGES
pip3 install -q -r requirements.txt
make html SPHINXOPTS="-D language=$LOCALE -D gettext_compact=0 -W --keep-going" 2> >(error)
sphinx-build -b dummy -d build/doctrees -j auto -D language=$LOCALE -D gettext_compact=0 -W --keep-going -W . build/html 2> >(error)
16 changes: 16 additions & 0 deletions .github/scripts/update.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,20 @@
#!/bin/bash

cd cpython || exit 1

# Restore git timestamp for enabling build cache
rev=HEAD
for f in $(git ls-tree -r -t --full-name --name-only "$rev" Doc) ; do
touch -d $(git log --pretty=format:%cI -1 "$rev" -- "$f") "$f";
done

cd ..
cd docs || exit 1

# Restore git timestamp for enabling build cache
rev=HEAD
for f in $(git ls-tree -r -t --full-name --name-only "$rev") ; do
touch -d $(git log --pretty=format:%cI -1 "$rev" -- "$f") "$f";
done

$(realpath ../tx) pull --languages "$LOCALE" -t --use-git-timestamps --workers 25 --silent
9 changes: 9 additions & 0 deletions .github/workflows/sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,17 @@ jobs:
run: .github/scripts/update.sh
env:
TX_TOKEN: ${{ secrets.TRANSIFEX_APIKEY }}
- uses: actions/cache/restore@v3
with:
path: cpython/Doc/build
key: cache-${{ inputs.version }}-${{ github.run_id }}
restore-keys: cache-${{ inputs.version }}-
- name: build
run: .github/scripts/build.sh
- uses: actions/cache/save@v3
with:
path: cpython/Doc/build
key: cache-${{ inputs.version }}-${{ github.run_id }}
- name: stat
run: python .github/scripts/tx_stat.py > ./docs/.stat.json
env:
Expand Down