Update branch name in docs/l10n workflow #200
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update docs and translatable strings | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
strings: | |
name: Upload translatable strings | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
- name: Install dependencies | |
run: | | |
sudo apt-get update -q | |
sudo apt-get install -qy jq | |
pip install -e .[babel] | |
- name: Extract | |
run: python setup.py extract_messages | |
- name: Upload | |
env: | |
poeditor_api_token: ${{ secrets.POEDITOR_API_TOKEN }} | |
run: ./scripts/poedit.sh upload | |
build: | |
name: Generate docs | |
needs: strings | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
- name: Install dependencies | |
run: | | |
sudo apt-get update -q | |
sudo apt-get install -qy jq gobject-introspection libgirepository-1.0-1 gir1.2-gtk-3.0 gir1.2-glib-2.0 gir1.2-gstreamer-1.0 gir1.2-poppler-0.18 python3-pip python3-setuptools python3-wheel libgirepository1.0-dev vlc | |
pip install pygobject pycairo .[build_sphinx] .[vlc_video] | |
- name: Build | |
env: | |
poeditor_api_token: ${{ secrets.POEDITOR_API_TOKEN }} | |
run: | | |
./scripts/poedit.sh contributors | |
python3 -m sphinx -bhtml docs/ build/sphinx/html -t api_doc -t install_instructions | |
tar czf pympress-docs.tar.gz -C build/sphinx/html/ . | |
- name: Upload | |
uses: actions/upload-artifact@v3 | |
with: | |
name: pympress-docs.tar.gz | |
path: pympress-docs.tar.gz | |
deploy: | |
name: Deploy docs | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
repository: pympress/pympress.github.io | |
token: ${{ secrets.GITHUB_PERSONAL_ACCESS_TOKEN }} | |
ref: main | |
- name: Download | |
uses: actions/download-artifact@v3 | |
with: | |
name: pympress-docs.tar.gz | |
path: . | |
- name: Extract and push | |
run: | | |
tar xzf pympress-docs.tar.gz | |
rm pympress-docs.tar.gz | |
git add . | |
git -c user.email=me@cimba.li -c user.name="${GITHUB_ACTOR}" commit -m "Github Action-built docs update" | |
git push |