-
Notifications
You must be signed in to change notification settings - Fork 35
40 lines (36 loc) · 1.04 KB
/
sync-french.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
name: Mirror Content to French repo
on:
push:
branches:
- master
paths:
- "**/*.*"
- "!CNAME"
- "!.github/**"
- ".github/workflows/sync-french.yml"
jobs:
build:
runs-on: ubuntu-latest
if: github.repository_owner == 'canada-ca'
steps:
- name: Checkout Main repo
uses: actions/checkout@v4
with:
path: english
- name: Checkout French mirror
uses: actions/checkout@v4
with:
repository: canada-ca/ore-ero-fr
path: french
ref: master
token: ${{ secrets.PUSH_API_TOKEN }}
- name: Copy files from English to French
run: rsync -avr --delete --exclude=*.git/* --exclude=*.github/* --exclude='*CNAME' english/ french
- name: Push back changes to French repo
run: |
cd french
git config --global user.email "[email protected]"
git config --global user.name "canada-bot"
git add -A
git commit -m "Sync Action" || true
git push