-
Notifications
You must be signed in to change notification settings - Fork 3
57 lines (46 loc) · 1.17 KB
/
gh-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
54
55
56
57
name: Build and Deploy to GitHub Pages
on:
workflow_dispatch:
push:
branches:
- '1.0'
- '2.0'
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: read
pages: write
id-token: write
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.8'
cache: 'pip'
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install --upgrade --requirement ./requirements.txt
- name: Build Multiversion Docs
run: |
git fetch --all
git checkout 1.0
git checkout 2.0
git checkout main
cd docs
make multiversion
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: 'docs/_build/html'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}