-
Notifications
You must be signed in to change notification settings - Fork 88
79 lines (75 loc) · 2.39 KB
/
docs-latest-public.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
name: Docs - Build latest docs and deploy to GitHub pages on main
on:
workflow_call:
workflow_dispatch:
permissions:
actions: read
contents: read
pages: write
id-token: write
concurrency:
# Note that people may spam the post-commit pipeline on their branch, and
# we have this docs pipeline in the post-commit pipeline, then people
# would have to wait until the previous one fully completes. That may be
# ok because each post-commit pipeline definitely takes more than 30 min
group: "pages-${{ github.ref }}"
cancel-in-progress: false
jobs:
build-deploy-docs:
strategy:
# Do not fail-fast because we need to ensure all tests go to completion
# so we try not to get hanging machines
fail-fast: false
matrix:
arch: [grayskull]
env:
TT_METAL_ENV: ${{ vars.TT_METAL_ENV }}
DOCS_VERSION: latest
ARCH_NAME: ${{ matrix.arch }}
environment: dev
runs-on: build
steps:
- uses: tenstorrent-metal/metal-workflows/.github/actions/[email protected]
- uses: ./.github/actions/install-metal-deps
with:
os: ubuntu-20.04
- uses: ./.github/actions/install-metal-dev-deps
with:
os: ubuntu-20.04
- name: Build tt-metal
run: |
export TT_METAL_HOME=$(pwd)
make build
- name: Activate docs environment and build docs
run: |
export PYTHONPATH=$(pwd)
source build/python_env/bin/activate
cd docs/
make html
- name: Build additional ttnn sweeps docs
env:
GITHUB_TOKEN: ${{ github.token }}
run: |
export PYTHONPATH=$(pwd)
source build/python_env/bin/activate
cd docs/
make ttnn_sweeps/check_directory
make ttnn_sweeps
- name: Prepare artifact - move output
run: |
mkdir gh_pages
mv docs/build/html gh_pages/$DOCS_VERSION
- name: Prepare artifact - create .nojekyll
run: |
touch gh_pages/.nojekyll
- name: Prepare artifact - create root index
run: |
touch gh_pages/index.html
- name: Upload artifact
uses: actions/[email protected]
with:
path: "gh_pages"
- name: Deploy to GitHub Pages
if: ${{ github.ref == 'refs/heads/main' }}
id: deployment
uses: actions/[email protected]