Skip to content

Use manual run instead of EndBug/add-and-commit action #18

Use manual run instead of EndBug/add-and-commit action

Use manual run instead of EndBug/add-and-commit action #18

name: 'Push plots to Overleaf'
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Overleaf project
run: |
cd ${{ github.workspace }}
cd ..
git clone ${{ secrets.OVERLEAF_GIT_CLONE_URL }} overleaf/
pwd
ls -lah
- name: Checkout python project on Github
uses: actions/checkout@v4
- name: Install dependencies
run: |
cd ${{ github.workspace }}
python3 -m pip install --upgrade pip
pip install -e ".[docs]"
- name: Run experiments and generate plots
run: |
cd ${{ github.workspace }}
python3 labproject/run.py
cd ..
pwd
ls -lah
ls -lah labproject/
cp labproject/plots/* overleaf/figures/
- name: Commit and push changes to Overleaf
run: |
cd ${{ github.workspace }}
cd ../overleaf/
git config --global user.name "Github Actions"
git config --global user.email ""
git add figures/
git commit -m "Update figures automatically"
git push