File tree Expand file tree Collapse file tree 4 files changed +47
-7
lines changed
Expand file tree Collapse file tree 4 files changed +47
-7
lines changed Original file line number Diff line number Diff line change 1+ name : Update website
2+ on :
3+ push :
4+ branches :
5+ - master
6+ paths :
7+ - ' docs/**'
8+ concurrency : website
9+ permissions :
10+ contents : write
11+
12+ jobs :
13+ website :
14+ runs-on : ubuntu-latest
15+ steps :
16+ - name : Checkout code
17+ uses : actions/checkout@v3
18+ with :
19+ fetch-depth : 0
20+ - name : Setup Python
21+ uses : actions/setup-python@v4
22+ with :
23+ python-version : ' 3.10'
24+ cache : pipenv
25+ - name : Install pipenv
26+ run : pip install pipenv
27+ - name : Install dependencies
28+ run : pipenv sync
29+ working-directory : docs
30+ - name : Update website
31+ run : scripts/update-website
32+ - name : Commit changes
33+ run : |
34+ if git diff --quiet; then
35+ git add --all
36+ git config user.name 'github-actions[bot]'
37+ git config user.email 'github-actions[bot]@users.noreply.github.com'
38+ git commit -m 'Update website'
39+ git push origin gh-pages
40+ fi
Original file line number Diff line number Diff line change 1919# Generated source
2020src /builtin.inc
2121* .pc
22+ docs /output
2223
2324# Autotools junk
2425.libs
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1- #! /bin/sh
1+ #! /bin/bash
22
33# This script builds the website from the docs directory of
44# the current branch and copies it over to the gh-pages
55# branch.
66
7- set -eu
7+ set -eux
88set -o xtrace
9+ shopt -s dotglob
910
1011# build website
11- scriptdir=` dirname " $0 " `
12+ scriptdir=$( dirname " $0 " )
1213cd " $scriptdir " /../docs
1314rm -rf output
15+ mkdir output
1416pipenv run python3 build_website.py
1517cd ..
1618
@@ -20,7 +22,7 @@ cp -r docs/output/* "$tmpdir"
2022cp .gitignore " $tmpdir "
2123
2224# copy to gh-pages
23- git checkout gh-pages
25+ git switch gh-pages
2426cp -r " $tmpdir " /* .
2527cp " $tmpdir " /.gitignore .
2628
You can’t perform that action at this time.
0 commit comments