-
Notifications
You must be signed in to change notification settings - Fork 82
57 lines (48 loc) · 1.8 KB
/
docs.yml
File metadata and controls
57 lines (48 loc) · 1.8 KB
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: docs
on:
workflow_dispatch:
workflow_call:
jobs:
docs:
if: github.repository_owner == 'materialsproject'
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
strategy:
matrix:
os: ["ubuntu-latest"]
python-version: ["3.12"]
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: 3.12
- name: Install Python dependencies
run: |
python${{ matrix.python-version }} -m pip install --upgrade pip
python${{ matrix.python-version }} -m pip install -e "./emmet-core[docs]"
python${{ matrix.python-version }} -m pip install -e "./emmet-builders"
python${{ matrix.python-version }} -m pip install -e "./emmet-cli"
python${{ matrix.python-version }} -m pip install -e "./emmet-archival"
# TODO: To install graphiz and therefore use erdantic to draw pydantic models:
# - name: Install graphviz
# run: |
# # Required to generate entity-relationship diagrams for pydantic with erdantic
# # mac users should `brew install graphviz`, then
# # `CC=gcc CPPFLAGS="-I$(brew --prefix graphviz)/include" LDFLAGS="-L$(brew --prefix graphviz)/lib" pip install pygraphviz`
# # See: https://github.com/pygraphviz/pygraphviz/issues/572
# sudo apt install graphviz
# sudo apt install graphviz-dev
- name: Build
run: sphinx-build docs docs/_build
- name: Upload build artifact
uses: actions/upload-pages-artifact@v5
with:
path: ./docs/_build
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v5