build: update content-update branch on push to main
This commit is contained in:
parent
893b80d262
commit
606fb38c3f
1 changed files with 27 additions and 0 deletions
|
|
@ -44,3 +44,30 @@ jobs:
|
|||
ssh_key: '${{ secrets.DOCKER_SWARM_SSH_KEY }}'
|
||||
file: 'docker-stack.yaml'
|
||||
name: 'personal-page'
|
||||
|
||||
rebase:
|
||||
runs-on: ubuntu-latest
|
||||
needs: deploy
|
||||
if: success()
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: main
|
||||
|
||||
- name: Configure Git
|
||||
run: |
|
||||
git config --global user.name "robo"
|
||||
git config --global user.email "robo@alecodes.page"
|
||||
|
||||
- name: Rebase main into content-update
|
||||
run: |
|
||||
git remote add origin ${{ env.GITHUB_SERVER_URL }}/${{ env.GITHUB_REPOSITORY }}.git
|
||||
git fetch origin
|
||||
git rebase origin/content-update
|
||||
|
||||
- name: Push changes
|
||||
run: |
|
||||
git push origin content-update --force-with-lease
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue