-
Notifications
You must be signed in to change notification settings - Fork 24
41 lines (38 loc) · 1.33 KB
/
deploy_github_pages.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
36
37
38
39
40
41
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Deploy to gh-pages
on: [workflow_dispatch]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
if [ -f doc-requirements.txt ]; then pip install -r doc-requirements.txt; fi
- name: Install giotto-time
run: |
pip install -e .
- name: Git checkout and build sphinx docs
run: |
git config --global user.name "github-pages[bot]"
git config --global user.email "41898281+github-pages[bot]@users.noreply.github.com"
git fetch
git checkout gh-pages
git checkout master
cd docs
make html
- name: push to gh-pages
run: |
git symbolic-ref HEAD refs/heads/gh-pages
git reset --mixed gh-pages
git add --all
git add -f docs/build
git commit -m "push sphinx build"
git push origin gh-pages