-
Notifications
You must be signed in to change notification settings - Fork 20
53 lines (43 loc) · 1.35 KB
/
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
42
43
44
45
46
47
48
49
50
51
52
53
name: Deploy to gh-pages
on:
push:
branches:
- main
jobs:
publish:
name: 'Publish'
runs-on: ubuntu-latest
# Avoid running this workflow for forks:
if: "github.repository == 'data-apis/dataframe-api'"
steps:
- name: 'Checkout repository'
uses: actions/checkout@v3
- name: 'Install Python'
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: 'Install dependencies'
run: pip install -r ./requirements.txt
- name: 'Build documentation'
run: |
# Turn warnings into errors and ensure .doctrees is not deployed:
sphinx-build -b html -WT --keep-going spec build/draft -d doctrees
- name: 'Configure Git'
run: |
git config --local user.email "[email protected]"
git config --local user.name "dataframe-api-bot"
- name: 'Checkout gh-pages'
run: |
git fetch --all
git checkout gh-pages
- name: 'Copy build artifact'
run: |
rm -rf ./draft && cp -R ./build/draft ./draft
- name: 'Commit changes'
continue-on-error: true # needed when diff is empty
run: |
git add . && git commit -m "Deploy: ${{ github.sha }}"
- name: 'Push changes'
if: success()
run: |
git push origin gh-pages