Sync Repository at commit refs/heads/main #483
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: Sync Repository | |
run-name: Sync Repository at commit ${{ github.ref }} | |
on: | |
push: | |
branches: | |
- main | |
concurrency: | |
group: ${{ github.workflow }} | |
cancel-in-progress: true | |
jobs: | |
Sync-Repository: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Sleep 2 Minutes | |
run: | | |
sleep 120 | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup SSH | |
uses: webfactory/[email protected] | |
with: | |
ssh-private-key: | | |
${{ secrets.FORGE_DEPLOY_KEY }} | |
- name: Prep Remotes | |
run: | | |
cd ${{ github.workspace }} | |
# Ignore hosts keys, since we accept them as-is, add remotes | |
git config --global core.sshCommand 'ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no' | |
git remote add forge git@${{ secrets.FORGE_DOMAIN }}:${{ github.repository }}.git &> /dev/null | |
- name: Push Code | |
run: | | |
cd ${{ github.workspace }} | |
git push forge ${{ github.ref_name }} &> /dev/null |