Skip to content

Commit

Permalink
Add additional action for non-main branches
Browse files Browse the repository at this point in the history
  • Loading branch information
Baschdl committed Feb 5, 2024
1 parent 9c35efa commit d76ed7e
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/test_experiments.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: "Test experiments but don't publish them (only 'main' is published)"
on:
push:
branches-ignore:
- main
jobs:
build:
runs-on: self-hosted
steps:
- name: Clean up before run (delete repositories)
run: |
cd ${{ github.workspace }}
cd ..
rm -rf overleaf/
rm -rf github/
- name: Checkout Overleaf project
run: |
cd ${{ github.workspace }}
cd ..
git clone ${{ secrets.OVERLEAF_GIT_CLONE_URL }} overleaf/
- name: Checkout python project on Github
uses: actions/checkout@v4
- name: Cache dependency
if: "contains(runner.name, 'GitHub Actions')"
id: cache-dependencies
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/pyproject.toml') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies and labproject
run: |
cd ${{ github.workspace }}
python3 -m pip install --upgrade pip
pip install -e ".[docs]"
- name: Run experiments and generate plots
shell: bash
run: |
cd ${{ github.workspace }}
shopt -s nullglob
for script in run_*.py; do
python "$script"
done
# New step to build the MkDocs site
- name: Build MkDocs Site
run: |
cd ${{ github.workspace }}
mkdocs build

0 comments on commit d76ed7e

Please sign in to comment.