File: build-docs.sh

package info (click to toggle)
pyxnat 1.6.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,204 kB
  • sloc: python: 6,016; makefile: 28; sh: 17; xml: 11
file content (22 lines) | stat: -rwxr-xr-x 704 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
sphinx-build -b html doc build/sphinx/html
rm -rf /tmp/html
mv build/sphinx/html /tmp

GITHUB_REPO=https://${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git

git clone "$GITHUB_REPO" &> /dev/null
git checkout --orphan gh-pages
git rm --cached -r .
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"

git remote rm origin
# Add new "origin" with access token in the git URL for authentication
git remote add origin $GITHUB_REPO > /dev/null 2>&1

mv /tmp/html/*  .
touch .nojekyll
curl "https://raw.githubusercontent.com/pyxnat/pyxnat/master/pyxnat.ico" -o _static/pyxnat.ico
git add --all
git commit -m 'Update documentation'
git push origin gh-pages --force