forked from emscripten-core/emscripten
-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (53 loc) · 1.68 KB
/
update-website.yml
File metadata and controls
55 lines (53 loc) · 1.68 KB
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
name: Update website
on:
workflow_dispatch:
push:
branches: [ main ]
jobs:
update-website:
name: Update website
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.EMSCRIPTEN_BOT_TOKEN }}
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true
- name: Checkout website repo
uses: actions/checkout@v4
with:
repository: kripken/emscripten-site
ref: gh-pages
path: site/emscripten-site
token: ${{ secrets.EMSCRIPTEN_BOT_TOKEN }}
- name: pip install
run: |
which python3
python3 --version
python3 -m pip install -r requirements-dev.txt
- name: Update docs
run: |
set -o errexit
set -o xtrace
git config --global user.name emscripten-bot
git config --global user.email emscripten-bot@users.noreply.github.com
if ./tools/maint/update_docs.py; then
echo "update_docs.py returned zero, expectations up-to-date"
# Exit early and don't create a PR
exit 0
else
code=$?
if [[ $code != 2 ]] ; then
echo "update_docs.py failed with unexpected error $code (expected 2)"
exit 1
fi
fi
# Create a PR against the emscripten-site repo
cd site/emscripten-site
git push -f origin update
gh pr create --fill --head update --base gh-pages --reviewer sbc100,kripken
# TODO: Enable this once we figure out how to enforce review
# requirment
#gh pr merge --squash --auto