-
Notifications
You must be signed in to change notification settings - Fork 122
66 lines (55 loc) · 1.92 KB
/
deploy-pages.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# ------------------------------------------------------------------------------
# GitHub Actions scripts
# Copyright(c) pgRouting Contributors
#
# Main configuration
# ------------------------------------------------------------------------------
name: Deploy GitHub Pages
on:
push:
branches:
- master
jobs:
deploy:
runs-on: ubuntu-22.04
if: ${{ github.repository_owner == 'OSGeo' }}
steps:
- uses: actions/checkout@v3
- name: Install apt packages
run: |
sudo apt-get install cmake cpanminus
sudo cpanm Text::SimpleTable::AutoWidth
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r ./requirements.txt
- name: Initialize mandatory git config
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
- name: Build pages
run: |
mkdir -p build
bash ci/build-pages.sh
- name: Deploy pages
if: github.ref == 'refs/heads/master'
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: build/_build/html
- name: Update locale
if: github.ref == 'refs/heads/master'
run: |
mkdir -p build
bash tools/transifex/update_locale.sh
# Add the files, commit and push
for line in `cat build/doc/locale_changes_po_pot.txt`; do git add "$line"; done
git diff --staged --quiet || git commit -m "Update locale: commit ${{ env.GIT_HASH }}"
git fetch origin master
git restore . # Remove the unstaged changes before rebasing
git rebase origin/master
git push origin master