Skip to content

Commit 3b75dc2

Browse files
ktranDevtools-frontend LUCI CQ
authored andcommitted
Add publish-component-docs action to schedule and publish docs
This action is configured to run once every day and build & publish the latest component docs. Bug: 414332459 Change-Id: Iaf05c12504bc01fd5d713a6e7f60f0828987fc48 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/7079580 Reviewed-by: Alex Rudenko <[email protected]> Commit-Queue: Kim-Anh Tran <[email protected]>
1 parent 09056b0 commit 3b75dc2

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: DevTools Component Documentation release
2+
3+
on:
4+
schedule:
5+
- cron: "0 7 * * *"
6+
7+
jobs:
8+
build-docs:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
contents: write
12+
steps:
13+
- name: Checkout depot_tools
14+
run: git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
15+
- name: Add depot_tools to path
16+
run: echo $(realpath depot_tools) >> $GITHUB_PATH
17+
- name: Checkout repository
18+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
19+
with:
20+
# We need to make sure that the parent directory of the checkout
21+
# is correctly identified as a standalone checkout (see devtools_paths.py).
22+
# Therefore name the parent directory 'devtools'.
23+
path: devtools/devtools-frontend
24+
# Since we didn't fetch but just checkout the repository content,
25+
# we need to create an unmanaged gclient config.
26+
- name: Create gclient config
27+
run: gclient config --unmanaged https://chromium.googlesource.com/devtools/devtools-frontend
28+
working-directory: devtools
29+
- name: Sync dependencies
30+
run: gclient sync
31+
working-directory: devtools/devtools-frontend
32+
- name: Generate build files (gn)
33+
run: gn gen out/Default --args='devtools_skip_typecheck=true'
34+
working-directory: devtools/devtools-frontend
35+
- name: Build DevTools Frontend (autoninja)
36+
run: autoninja -C out/Default scripts/component_docs
37+
working-directory: devtools/devtools-frontend
38+
- name: GitHub Pages v3
39+
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0
40+
with:
41+
github_token: ${{ secrets.GITHUB_TOKEN }}
42+
publish_dir: devtools/devtools-frontend/out/Default/gen

0 commit comments

Comments
 (0)