-
-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (42 loc) · 1.08 KB
/
merge-main-to-gh-pages.yml
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
37
38
39
40
41
42
43
44
45
46
47
name: Merge main to gh-pages
on:
push:
branches:
- main
jobs:
merge_to_ghpages:
permissions:
actions: write
checks: write
contents: write
deployments: write
issues: write
packages: write
pull-requests: write
repository-projects: write
security-events: write
statuses: write
runs-on: ubuntu-latest
steps:
- name: Checkout main repository
uses: actions/checkout@v3
with:
ref: main
fetch-depth: 0
- name: Checkout gh-pages repository
uses: actions/checkout@v3
with:
ref: gh-pages
fetch-depth: 0
- name: Set up Git
run: |
git config --global user.name "${{ github.actor }}"
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
- name: Merge main to gh-pages
run: |
git merge origin/main
if [[ -n $(git status -s) ]]; then
echo "There are conflicts. Merge aborted."
exit 1
fi
git push origin