-
Notifications
You must be signed in to change notification settings - Fork 27
36 lines (30 loc) · 1.16 KB
/
sync_termux_com.yml
File metadata and controls
36 lines (30 loc) · 1.16 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: Sync termux.com
on:
workflow_dispatch:
jobs:
sync-termux-com:
runs-on: ubuntu-slim
steps:
- name: Clone repository
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.SYNC_TERMUX_COM_TOKEN }}
- name: Sync termux.com
if: github.repository == 'termux/termux.com'
run: |
git config --global user.name 'agnostic-apollo'
git config --global user.email '[email protected]'
# Add termux/termux.github.io as upstrem and fetch it
echo "Adding upstream"
git remote add upstream https://github.com/termux/termux.github.io.git
git fetch upstream
# Switch to mirror branch
echo "Checking out mirror branch"
git checkout mirror
# Rebase upstream/master over mirror branch and keep CNAME(termux.com) file
echo "Rebase upstream/master"
git rebase --strategy-option=theirs upstream/master
# Push branch
echo "Pushing mirror branch"
git push -f origin mirror