-
Notifications
You must be signed in to change notification settings - Fork 0
28 lines (28 loc) · 1.12 KB
/
notebook_colab_gen.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
name: Build google colab notebooks
run-name: ${{ github.actor }} is building colab notebooks from regular notebooks
on: [push]
env:
notebook_dir: "./notebooks"
colab_directory: "./colab_notebooks"
branch: $GITHUB_HEAD_REF
jobs:
add_nbs:
runs-on: ubuntu-latest
steps:
- run: echo "The job was automatically triggered by a ${{ github.event_name }} event."
- name: Check out the repository to the runner
uses: actions/checkout@v4
- name: Run the colab build script
run: python build_scripts/colab_nb_builder.py --directory $notebook_dir --output_dir $colab_directory
- name: Configuring git & committing
run: |
git config --local user.name "colabifier-action"
git add $colab_directory
git commit -m "Updating the repository GitHub html pages in the docs folder"
- run: echo Current branch is $branch
- name: Push changes # push the output folder to your repo
uses: ad-m/github-push-action@$branch
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
force: true
- run: echo "Job status is ${{ job.status }}"