forked from jmunroe/spyglass-demo
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
16 additions
and
2 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 |
---|---|---|
|
@@ -13,14 +13,28 @@ jobs: | |
uses: actions/checkout@v2 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
fetch-depth: 0 # Fetch all history for all branches and tags | ||
|
||
- name: Install rsync | ||
run: sudo apt-get install rsync | ||
|
||
- name: Rsync notebooks | ||
run: | | ||
git clone https://github.com/LorenFrankLab/spyglass.git tmp --depth=1 | ||
rsync -av --exclude='.git/' tmp/notebooks/ ./notebooks/ | ||
- name: Configure git | ||
run: | | ||
git config user.name "GitHub Actions" | ||
git config user.email "[email protected]" | ||
- name: Commit changes | ||
run: | | ||
git add notebooks/ | ||
git commit -m "Sync notebooks" || echo "No changes to commit" | ||
git push origin HEAD:main | ||
git diff --staged --quiet || git commit -m "Sync notebooks" | ||
- name: Pull with rebase | ||
run: git pull --rebase | ||
|
||
- name: Push changes | ||
run: git push origin HEAD:master |