-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Link to documentation-theme-jekyll with submodules and update daily
- Loading branch information
1 parent
6709df0
commit 52955f3
Showing
2 changed files
with
49 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: sync theme submodules | ||
|
||
on: | ||
push: | ||
branches: gh-pages | ||
|
||
schedule: | ||
- cron: "00 14 * * *" | ||
|
||
workflow_dispatch: | ||
|
||
|
||
jobs: | ||
sync_theme_submodules: | ||
if: github.repository_owner == 'MattGrossi-NOAA' # only run if I own repo (change if transferred to organization) | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: submodule checkout | ||
run: | | ||
git submodule update --init | ||
- name: check submodule status | ||
run: | | ||
git submodule status | ||
- name: Update theme from submodules | ||
run: | | ||
git submodule update --remote --merge | ||
- name: check submodule status 2 | ||
run: | | ||
git submodule status | ||
- name: Commit and push if it changed | ||
run: | | ||
git config user.name "Automated" | ||
git config user.email "[email protected]" | ||
git add -A | ||
timestamp=$(date -u) | ||
git commit -m "Update theme on: ${timestamp}" || exit 0 | ||
git push |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[submodule "documentation-theme-jekyll"] | ||
path = theme | ||
url = https://github.com/MattGrossi-NOAA/documentation-theme-jekyll | ||
[submodule "_data/navbars_theme"] | ||
path = _data/navbars | ||
url = https://github.com/MattGrossi-NOAA/documentation-theme-jekyll | ||
branch = navbars |