Update API documentation #1419
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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: | |
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 | |
uses: actions/cache@v2 | |
with: | |
path: dist/*/.sha | |
key: dist-${{ hashFiles('dist/*/.sha') }} | |
restore-keys: | | |
dist- | |
- name: Build docs | |
run: | | |
python update.py | |
- name: Deploy | |
uses: JamesIves/github-pages-deploy-action@releases/v3 | |
with: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SINGLE_COMMIT: true | |
BASE_BRANCH: main | |
BRANCH: gh-pages | |
FOLDER: dist | |
GIT_CONFIG_NAME: V8 API docs updater | |
GIT_CONFIG_EMAIL: [email protected] |