Skip to content

Merge pull request #6 from tuftsdatalab/develop #6

Merge pull request #6 from tuftsdatalab/develop

Merge pull request #6 from tuftsdatalab/develop #6

name: mirror-content
on:
push:
branches:
- main
jobs:
get-date:
runs-on: ubuntu-latest
outputs:
date: ${{ steps.date.outputs.date }}
steps:
- id: date
run: |
echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
mirror-to-binder-branch:
runs-on: ubuntu-latest
needs: get-date
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: tuftsrt/branch-manager@develop
with:
destination-branch: binder
clear-destination: "true"
copy: |
binder/|.binder
tutorial/|
replace: |
GH_ACTIONS_DATE|${{ needs.get-date.outputs.date }}|*.ipynb
mirror-to-colab-branch:
runs-on: ubuntu-latest
needs: get-date
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- id: get-find-replace
run: |
echo "find=$(<./colab/find.txt)" >> $GITHUB_OUTPUT
echo "replace=$(<./colab/replace.txt)" >> $GITHUB_OUTPUT
- uses: tuftsrt/branch-manager@develop
with:
destination-branch: colab
clear-destination: "true"
copy: |
tutorial/*.ipynb|
replace: |
GH_ACTIONS_DATE|${{ needs.get-date.outputs.date }}|*.ipynb
${{ steps.get-find-replace.outputs.find }}|${{ steps.get-find-replace.outputs.replace }}|*.ipynb
mirror-to-data-branch:
runs-on: ubuntu-latest
needs: get-date
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: tuftsrt/branch-manager@develop
with:
destination-branch: data
clear-destination: "true"
copy: |
tutorial/data/|
mirror-to-tutorial-branch:
runs-on: ubuntu-latest
needs: get-date
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: tuftsrt/branch-manager@develop
with:
destination-branch: tutorial
clear-destination: "true"
copy: |
binder/environment.yml|environment.yml
tutorial/|
replace: |
GH_ACTIONS_DATE|${{ needs.get-date.outputs.date }}|*.ipynb