Update Carch Submodule #2
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
name: 'Update Carch Submodule' | |
on: | |
push: | |
paths: | |
- 'carch/**' # Detects any changes in the carch submodule | |
workflow_dispatch: # Allows manual triggering of the workflow | |
jobs: | |
update-submodule: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout documentation repository | |
uses: actions/checkout@v3 | |
- name: Set Git identity | |
run: | | |
git config --global user.name "GitHub Actions" | |
git config --global user.email "[email protected]" | |
- name: Initialize and update submodules | |
run: | | |
git submodule init | |
git submodule update | |
- name: Pull latest changes for submodule | |
run: | | |
cd carch | |
git fetch --all | |
git checkout main # Or any other branch you're using | |
git pull origin main # Pull latest changes | |
- name: Commit and push changes to the docs repository | |
run: | | |
git add carch | |
git commit -m "Update carch submodule" | |
git push origin main # Or the branch you're using |