-
Notifications
You must be signed in to change notification settings - Fork 28
35 lines (32 loc) · 996 Bytes
/
publish.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
name: publish
on: [push]
jobs:
sphinx:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install Requirements
run: |
pip3 install -r requirements.txt
- name: Sphinx build
run: |
sphinx-multiversion . build
- name: Publish gh-pages
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
run: |
cd build
git init
git config user.name "Key4hep bot"
git config user.email "[email protected]"
git remote add upstream https://vvolkl:${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git
touch .nojekyll
git add .nojekyll
git commit -m "Initial commit"
git branch -m gh-pages
touch .
cp ../.github/aux/gh-pages-redirect.html index.html
git add -A .
git commit -m "Rebuild page at ${GITHUB_SHA}"
git push -f upstream gh-pages:gh-pages