From 7c9cd4fc94623b0470171a04c8d91107d05f0e61 Mon Sep 17 00:00:00 2001 From: hiroshi Date: Mon, 29 Apr 2024 10:04:28 -0400 Subject: [PATCH] i'm bad at git --- .github/workflows/submodule-update.yml | 32 ++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/submodule-update.yml diff --git a/.github/workflows/submodule-update.yml b/.github/workflows/submodule-update.yml new file mode 100644 index 0000000..994f2d6 --- /dev/null +++ b/.github/workflows/submodule-update.yml @@ -0,0 +1,32 @@ +name: Send submodule updates to joshuah345.github.io + +on: + workflow_dispatch: + + push: + branches: + - master + +jobs: + update: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + with: + repository: joshuah345/joshuah345.github.io + token: ${{ secrets.PRIVATE_TOKEN_GITHUB }} + submodules: true + + - name: Pull & update submodules recursively + run: | + git submodule update --init --recursive + git submodule update --recursive --remote + + - name: Commit + run: | + git config user.email "actions@github.com" + git config user.name "GitHub Actions - update submodules" + git add --all + git commit -m "Update submodules" || echo "No changes to commit" + git push