-
Notifications
You must be signed in to change notification settings - Fork 5
44 lines (41 loc) · 1.27 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
name: documentation
# on all pull requests
# on pushes to the main branch
on:
push:
branches:
- main
pull_request:
branches:
- main
permissions:
contents: write
jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up python
uses: actions/setup-python@v3
with:
python-version: 3.10.11
- name: Install python dependencies
run: |
cd transformers && pip install -I --force-reinstall setuptools==71.0.0 && pip install --no-build-isolation --no-cache-dir -r requirements.txt
- name: Install dbt dependencies
run: |
cd transformers/synthetix && dbt deps
- name: Build docs
run: |
cd transformers/synthetix && dbt docs generate --profiles-dir profiles --profile synthetix-host
env:
PG_HOST: ${{ secrets.PG_HOST }}
PG_PASSWORD: ${{ secrets.PG_PASSWORD }}
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
with:
publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: transformers/synthetix/target
force_orphan: true