Bug fix #2
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update Overleaf with Plots | |
on: | |
push: | |
branches: | |
- main # Set this to match the branch name you use | |
- automatic_plot_upload | |
jobs: | |
update-overleaf: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup Git Config | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "GitHub CI/CD Bot" | |
- name: Setup .netrc for Git authentication | |
env: | |
OVERLEAF_TOKEN: ${{ secrets.OVERLEAF_TOKEN }} | |
run: | | |
cat << EOF > $HOME/.netrc | |
machine git.overleaf.com | |
login $OVERLEAF_TOKEN | |
password x-oauth-basic | |
EOF | |
chmod 600 $HOME/.netrc | |
- name: Create directory for Overleaf Repository | |
run: mkdir -p ${{ github.workspace }}/AST-Merging-Evaluation-Paper | |
- name: Clone Overleaf Repository | |
env: | |
OVERLEAF_GIT_REPO: ${{ secrets.OVERLEAF_REPO_URL }} | |
run: | | |
git clone $OVERLEAF_GIT_REPO ${{ github.workspace }}/AST-Merging-Evaluation-Paper | |
- name: Run make command to copy plots | |
run: make copy-paper | |
- name: Change directory to Overleaf repository | |
run: cd ${{ github.workspace }}/AST-Merging-Evaluation-Paper | |
- name: Commit and Push to Overleaf | |
run: | | |
git add . | |
git commit -m "Automated plot updates by GitHub CI/CD Bot" | |
git push origin master |