-
-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (31 loc) · 1.05 KB
/
sync_with_terminal_wiki.yaml
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
name: sync source code from terminal-wiki
on:
schedule:
- cron: '0 0 * * 1' # At 00:00 on Monday
workflow_dispatch:
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout wiki repository
uses: actions/checkout@v2
with:
repository: charanravi-online/wiki
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
- name: Configure user info
run: |
git config user.email "[email protected]"
git config user.name "R Charan"
- name: Fetch changes from terminal-wiki
run: |
git remote add upstream https://github.com/charanravi-online/terminal-wiki.git || true
git fetch upstream
- name: Checkout specific folders
run: |
git checkout upstream/main -- src/ requirements.txt setup.py
# only the above mentioned files and folder are synced
- name: Commit changes
run: |
git add .
git commit -m "Sync the main python core application from terminal-wiki"
git push origin main