Repository navigation
55 lines (50 loc) · 1.77 KB
/
Copy pathupdate-api-docs.yml
File metadata and controls
55 lines (50 loc) · 1.77 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
# Copyright 2020 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
name: Update API documentation
on:
push:
branches:
- main
schedule:
# Rebuild docs every day at 3am.
- cron: '0 3 * * *'
workflow_dispatch:
permissions:
contents: write
jobs:
build:
name: Build and update docs
runs-on: ubuntu-latest
container:
image: docker://python:3.7-alpine
steps:
- name: Install dependencies
run: |
apk add doxygen git graphviz openssh-client rsync tar ttf-freefont zstd
# Workaround for `fatal: unsafe repository (REPO is owned by someone else)` issue, see
# https://github.com/actions/checkout/issues/760
- name: Trust /__w Directory (GIT_CEILING_DIRECTORIES)
run: export GIT_CEILING_DIRECTORIES=/__w # before git v2.35.2
- name: Trust /__w Directory (safe.directory)
run: git config --global --add safe.directory /__w/api/api # after git v2.35.2
- name: Checkout API repo
uses: actions/checkout@v2
- name: Restore cached doc SHAs
run: |
git clone --depth=1 --filter=blob:none --no-checkout --branch=gh-pages https://github.com/${{ github.repository }}.git dist
git -C dist sparse-checkout set --no-cone '/*/.sha'
git -C dist checkout
rm -rf dist/.git
- name: Build docs
run: |
python update.py
- name: Deploy
uses: JamesIves/github-pages-deploy-action@releases/v4
with:
single-commit: true
clean: false
branch: gh-pages
folder: dist
git-config-name: V8 API docs updater
git-config-email: v8-dev+api@googlegroups.com