-
Notifications
You must be signed in to change notification settings - Fork 1
43 lines (37 loc) · 1.09 KB
/
ci-docs.yaml
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
# NOTE: This name appears in GitHub's Checks API and in workflow's status badge.
name: ci-docs
# Trigger the workflow when:
on:
push:
branches:
- gh-pages
# Every 15 minutes (for the default/main branch).
schedule:
- cron: "*/15 * * * *"
jobs:
publish-docs:
# NOTE: This name appears in GitHub's Checks API.
name: publish-docs
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
ref: gh-pages
submodules: true
- name: Update all submodules to latest versions
run: |
# Update submodules.
git submodule update --remote
# Stop if there are no changes.
git diff --quiet && exit 0
git config user.name "${COMMITTER_NAME}"
git config user.email "${COMMITTER_EMAIL}"
git add .
git commit --message "${COMMIT_MESSAGE}"
git push
env:
COMMIT_MESSAGE: Update submodules
COMMITTER_NAME: github-actions[bot]
COMMITTER_EMAIL: noreply@github.com