-
Notifications
You must be signed in to change notification settings - Fork 3
33 lines (28 loc) · 941 Bytes
/
standalone.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
name: Standalone
on: [push]
jobs:
standalone:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build standalone
run: |
./htmlviewer -a > index.html
./htmlviewer -A > shortcuts.html
./htmlviewer -h | ./man2html.sh > man.html
- uses: actions/checkout@v2
with:
ref: gh-pages
path: standalone
- name: Push changes
run: |
mv index.html shortcuts.html man.html standalone/
cd standalone
if ! git diff --quiet ; then
git config --global user.name 'Jonathan Poelen'
git config --global user.email 'jonathan.poelen@gmail.com'
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
git commit -am "update standalone"
git push
fi