-
Notifications
You must be signed in to change notification settings - Fork 8
83 lines (67 loc) · 2.06 KB
/
deploy-docs.yaml
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: Deploy Documentation
on:
push:
branches:
- master
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: write
id-token: write
pages: write
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/[email protected]
with:
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install Poetry
uses: snok/install-poetry@v1
- name: Install Dependencies
run: |
poetry install --no-interaction
- name: Install dependencies
# pip will install despite the conflicts, poetry will prevent it
run: |
poetry run pip install wheel
poetry run pip install --no-build-isolation "Cython<3" "pyyaml==5.4.1"
poetry run pip install sphinx sphinx-rtd-theme
- name: Setup brownie networks
run: |
poetry run brownie networks modify mainnet host=${{ secrets.ALCHEMY_PROVIDER }}
continue-on-error: true
- name: Build documentation config
run: |
make docs
- name: Build documentation
run: |
cd docs
BROWNIE_NETWORK_ID=mainnet make html
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/_build/html
- name: Checkout
uses: actions/checkout@v4
with:
ref: gh-pages
persist-credentials: false
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
# Upload entire repository
path: '.'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4