Skip to content

Commit

Permalink
adding doc theme update GHA
Browse files Browse the repository at this point in the history
  • Loading branch information
MathewBiddle committed Apr 11, 2023
1 parent c14c540 commit 289b74a
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/sync_theme.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: sync theme submodules

on:
push:
branches: gh-pages

schedule:
- cron: "00 14 * * *"

workflow_dispatch:


jobs:
sync_theme_submodules:
if: github.repository_owner == 'ioos' # only run if ioos owns repo
runs-on: ubuntu-20.04
steps:
- name: Checkout repo
uses: actions/checkout@v3
with: { ref: gh-pages }

- 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

0 comments on commit 289b74a

Please sign in to comment.