diff --git a/.github/workflows/push-plots-to-paper.yml b/.github/workflows/push-plots-to-paper.yml new file mode 100644 index 0000000000..7910f5b41a --- /dev/null +++ b/.github/workflows/push-plots-to-paper.yml @@ -0,0 +1,38 @@ +name: Update Overleaf with Plots + +on: + push: + branches: + - main + +jobs: + update-overleaf: + runs-on: ubuntu-latest + + steps: + - uses: GuillaumeFalourd/setup-rsync@v1.2 + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup Git Config and Credentials + run: | + git config --global user.email "github-cicd-bot@example.com" + git config --global user.name "GitHub CI/CD Bot" + + - name: Create directory for Overleaf Repository + run: mkdir -p ../AST-Merging-Evaluation-Paper + + - name: Clone Overleaf Repository + env: + OVERLEAF_GIT_REPO: ${{ secrets.OVERLEAF_GIT_REPO }} + run: | + git clone ${OVERLEAF_GIT_REPO} ../AST-Merging-Evaluation-Paper + + - name: Run make command to copy plots + run: make copy-paper + + - name: Commit and Push to Overleaf + run: | + cd ../AST-Merging-Evaluation-Paper + git add . + git diff --staged --exit-code || (git commit -m "Automated plot updates by GitHub CI/CD Bot" && git push origin master) diff --git a/.gitignore b/.gitignore index 282a71e677..bafc21a4fa 100644 --- a/.gitignore +++ b/.gitignore @@ -16,6 +16,7 @@ cache*.tar cache.tar output.txt replay_logs/ +my.secrets output/ merge_repo/