-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
A workflow to sync this repository with the rfc website.
- Loading branch information
Showing
1 changed file
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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 git@github.com:vacp2p/rfc-website.git | ||
cd rfc-website | ||
git config --local user.email "actions@github.com" | ||
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 |