Skip to content

Commit 5036979

Browse files
committed
ci: Migrate CI from gh-pages
1 parent f956a2b commit 5036979

1 file changed

Lines changed: 43 additions & 0 deletions

File tree

.github/workflows/ci-docs.yaml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# NOTE: This name appears in GitHub's Checks API and in workflow's status badge.
2+
name: ci-docs
3+
4+
# Trigger the workflow when:
5+
on:
6+
push:
7+
branches:
8+
- gh-pages
9+
10+
# Every 15 minutes (for the default/main branch).
11+
schedule:
12+
- cron: "*/15 * * * *"
13+
14+
jobs:
15+
16+
publish-docs:
17+
# NOTE: This name appears in GitHub's Checks API.
18+
name: publish-docs
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout code
22+
uses: actions/checkout@v2
23+
with:
24+
fetch-depth: 0
25+
ref: gh-pages
26+
submodules: true
27+
28+
- name: Update all submodules to latest versions
29+
run: |
30+
# Update submodules.
31+
git submodule update --remote
32+
# Stop if there are no changes.
33+
git diff --quiet && exit 0
34+
35+
git config user.name "${COMMITTER_NAME}"
36+
git config user.email "${COMMITTER_EMAIL}"
37+
git add .
38+
git commit --message "${COMMIT_MESSAGE}"
39+
git push
40+
env:
41+
COMMIT_MESSAGE: Update submodules
42+
COMMITTER_NAME: github-actions[bot]
43+
COMMITTER_EMAIL: noreply@github.com

0 commit comments

Comments
 (0)