-
Notifications
You must be signed in to change notification settings - Fork 2
41 lines (34 loc) · 1.04 KB
/
website-sync.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
name: Website Sync
on:
pull_request:
types: [closed]
branches:
- main
jobs:
sync:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Clone Website Repo
run: |
git clone [email protected]:vacp2p/rfc-website.git
cd rfc-website
git config --local user.email "[email protected]"
git config --local user.name "GitHub Actions"
- name: List of changed files
id: changed_files
run: |
echo "::set-output name=files::$(git diff --name-only ${{ github.event.before }} ${{ github.sha }})"
- name: Copy changed files to Website Repo
run: |
for file in ${{ steps.changed_files.outputs.files }}; do
cp --parents "$file" rfc-website/
done
- name: Push changes to Website Repo
run: |
cd rfc-website
git add .
git commit -m "Sync website"
git push origin main