Skip to content

Commit 6bbdb33

Browse files
authored
Add automatic doc building (#160)
* Add automatic doc building This is a script to automatically run update scripts once a week, just like the autoblack job in spaCy. * Fix job name * Run on push for initial trigger * Install spaCy before running updates * Disable jsonl script for now * Remove "on push" condition
1 parent 934fc40 commit 6bbdb33

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

‎.github/workflows/build-docs.yml‎

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# GitHub Action that builds docs regularly
2+
3+
name: Build Docs
4+
on:
5+
workflow_dispatch: # allow manual trigger
6+
schedule:
7+
- cron: '0 8 * * 5' # every Friday at 8am UTC
8+
9+
jobs:
10+
autodoc:
11+
if: github.repository_owner == 'explosion'
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v3
15+
with:
16+
ref: ${{ github.head_ref }}
17+
- uses: actions/setup-python@v4
18+
- name: Build Docs
19+
run: |
20+
pip install spacy
21+
python .github/update_docs.py
22+
python .github/update_category_docs.py
23+
# Temporarily commented out while PR is reviewed
24+
# python .github/update_projects_json.py
25+
- name: Check for modified files
26+
id: git-check
27+
run: echo modified=$(if git diff-index --quiet HEAD --; then echo "false"; else echo "true"; fi) >> $GITHUB_OUTPUT
28+
29+
- name: Create Pull Request
30+
if: steps.git-check.outputs.modified == 'true'
31+
uses: peter-evans/create-pull-request@v4
32+
with:
33+
title: Automated build of docs
34+
labels: meta
35+
commit-message: Automated docs build
36+
committer: GitHub <noreply@github.com>
37+
author: explosion-bot <explosion-bot@users.noreply.github.com>
38+
body: _This PR is auto-generated._
39+
branch: docs-build
40+
delete-branch: true
41+
draft: false
42+
- name: Check outputs
43+
if: steps.git-check.outputs.modified == 'true'
44+
run: |
45+
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
46+
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"

0 commit comments

Comments
 (0)