-
Notifications
You must be signed in to change notification settings - Fork 106
47 lines (43 loc) · 1.02 KB
/
docs.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
name: Docs
on:
push:
branches: [master]
paths:
- pyproject.toml
- tree_sitter/__init__.py
- tree_sitter/binding/*
- docs/**
concurrency:
group: ${{github.workflow}}-${{github.ref}}
cancel-in-progress: true
permissions:
pages: write
id-token: write
jobs:
docs:
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{steps.deploy.outputs.page_url}}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: true
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install
run: pip install -e .[docs]
env:
CFLAGS: -O0
- name: Build docs
run: sphinx-build -M html docs docs/_build
- name: Upload docs artifact
uses: actions/upload-pages-artifact@v3
with:
path: docs/_build/html
- name: Deploy to GitHub Pages
id: deploy
uses: actions/deploy-pages@v4