Skip to content

Update Submodules #1265

Update Submodules

Update Submodules #1265

name: Update Submodules
on:
workflow_dispatch:
repository_dispatch:
push:
branches:
- main # Set a branch to deploy
schedule:
- cron: "0 4 * * *" # This line sets the action to run at 4 AM every day
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
# Fetch all history so we can push to the repo
fetch-depth: 0
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
- name: Checkout submodules
run: |
git submodule update --init --recursive
git config --file=.gitmodules submodule.public/static.branch main
git submodule update --remote public/static
- name: Commit and push changes
run: |
git config --global user.email "${{secrets.EMAIL}}"
git config --global user.name "${{secrets.NAME}}"
git commit -am "Update submodules" || echo "No changes to commit"
git push