Skip to content

Merge pull request #46 from ocefpaf/keep_alive_v2 #378

Merge pull request #46 from ocefpaf/keep_alive_v2

Merge pull request #46 from ocefpaf/keep_alive_v2 #378

Workflow file for this run

name: sync theme submodules
on:
push:
branches: gh-pages
schedule:
- cron: "00 14 * * *"
workflow_dispatch: null
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@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4
- 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
keepalive-job:
name: Keepalive Workflow
runs-on: ubuntu-latest
if: github.event_name == 'schedule'
permissions:
actions: write
steps:
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4
- uses: gautamkrishnar/keepalive-workflow@beb86212524e1ae856d1cd80efb44e73bf7daf4a # 2.0.1