Merge branch 'topic/christian/build-docs-on-prs'

* topic/christian/build-docs-on-prs:
  Expand generate-docs Github workflow to test docs build on PRs
This commit is contained in:
Christian Kreibich 2022-02-09 15:15:21 -08:00
commit 9efc214d42
3 changed files with 16 additions and 6 deletions

View file

@ -1,9 +1,14 @@
name: Generate Documentation name: Generate Documentation
on: on:
pull_request:
schedule: schedule:
- cron: '0 0 * * *' - cron: '0 0 * * *'
defaults:
run:
shell: bash
jobs: jobs:
generate: generate:
if: github.repository == 'zeek/zeek' if: github.repository == 'zeek/zeek'
@ -15,7 +20,6 @@ jobs:
token: ${{ secrets.ZEEK_BOT_TOKEN }} token: ${{ secrets.ZEEK_BOT_TOKEN }}
- name: Sync Submodules - name: Sync Submodules
shell: bash
run: | run: |
auth_header="$(git config --local --get http.https://github.com/.extraheader)" auth_header="$(git config --local --get http.https://github.com/.extraheader)"
git submodule sync --recursive git submodule sync --recursive
@ -58,7 +62,6 @@ jobs:
( cd build && make -j 3 ) ( cd build && make -j 3 )
- name: Generate Docs - name: Generate Docs
shell: bash
run: | run: |
git config --global user.name zeek-bot git config --global user.name zeek-bot
git config --global user.email info@zeek.org git config --global user.email info@zeek.org
@ -76,16 +79,19 @@ jobs:
echo "*** Check for Sphinx Warnings ***" echo "*** Check for Sphinx Warnings ***"
grep -q WARNING make.out && exit 1 grep -q WARNING make.out && exit 1
rm make.out rm make.out
echo "*** Pushing zeek-docs Changes ***"
- name: Push zeek-docs Changes
if: github.event_name == 'schedule'
run: |
cd doc
git remote set-url origin "https://zeek-bot:${{ secrets.ZEEK_BOT_TOKEN }}@github.com/zeek/zeek-docs" git remote set-url origin "https://zeek-bot:${{ secrets.ZEEK_BOT_TOKEN }}@github.com/zeek/zeek-docs"
git add scripts/ script-reference/ git add scripts/ script-reference/
git status git status
git commit -m "Generate docs" && git push || /bin/true git commit -m "Generate docs" && git push || /bin/true
cd ..
- name: Update zeek-docs Submodule - name: Update zeek-docs Submodule
if: github.event_name == 'schedule'
run: | run: |
echo "*** Update zeek/doc Submodule ***"
git config --global user.name zeek-bot git config --global user.name zeek-bot
git config --global user.email info@zeek.org git config --global user.email info@zeek.org
git remote add auth "https://zeek-bot:${{ secrets.ZEEK_BOT_TOKEN }}@github.com/zeek/zeek" git remote add auth "https://zeek-bot:${{ secrets.ZEEK_BOT_TOKEN }}@github.com/zeek/zeek"

View file

@ -1,3 +1,7 @@
5.0.0-dev.106 | 2022-02-09 15:15:21 -0800
* Expand generate-docs Github workflow to test docs build on PRs (Christian Kreibich, Corelight)
5.0.0-dev.104 | 2022-02-09 13:14:04 -0800 5.0.0-dev.104 | 2022-02-09 13:14:04 -0800
* Updates to the cluster controller scripts to fix the docs build (Christian Kreibich, Corelight) * Updates to the cluster controller scripts to fix the docs build (Christian Kreibich, Corelight)

View file

@ -1 +1 @@
5.0.0-dev.104 5.0.0-dev.106