-
Notifications
You must be signed in to change notification settings - Fork 7
36 lines (31 loc) · 1.01 KB
/
update_deploy.yaml
File metadata and controls
36 lines (31 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: update deploy
on:
workflow_run:
workflows: [deploy to open,deploy from open]
types:
- completed
permissions:
contents: write
jobs:
update_branch:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
name: Merge main into deploy
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: deploy
fetch-depth: 0
persist-credentials: false
- name: Configure git
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/Sllambias/${{ github.event.repository.name }}
- name: Update deployment main
run: |
git merge --squash -X theirs origin/main
git restore --staged README.md
git commit -m "deploy changes"
git push