Repository navigation
62 lines (56 loc) · 1.79 KB
/
Copy pathpublish_docs.yml
File metadata and controls
62 lines (56 loc) · 1.79 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
58
59
60
61
62
name: Publish to GitHub Pages
on:
push:
branches:
- main
paths:
- '.github/workflows/publish_docs.yml'
- 'docs/**'
# The API reference is generated by typedoc from the library sources
# (docusaurus.config.js entryPoints), so a src-only change alters the
# published docs even when nothing under docs/ moves.
- 'packages/react-native-executorch/src/**'
- 'packages/react-native-executorch/tsconfig.doc.json'
workflow_dispatch:
jobs:
publish:
if: github.repository == 'software-mansion/react-native-executorch'
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v6
with:
# The Supported Models page dates each model from the release tags;
# blobs are fetched only for the files it reads.
fetch-depth: 0
filter: blob:none
- name: Generate docs
run: >-
git config --local user.email "action@github.com"
&& git config --local user.name "GitHub Action"
&& cd docs
&& yarn
&& yarn build
- name: Upload generated docs
uses: actions/upload-artifact@v4
with:
name: docs-build
path: docs/build
deploy:
needs: publish
runs-on: ubuntu-latest
steps:
# The deploy action re-fetches from origin, which fails in the
# blobless clone above, so deploy from a plain checkout.
- name: Check out
uses: actions/checkout@v6
- name: Download generated docs
uses: actions/download-artifact@v4
with:
name: docs-build
path: docs/build
- name: Publish generated content to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: docs/build
branch: gh-pages