Skip to content

skip PR creation if PR is already open #5

skip PR creation if PR is already open

skip PR creation if PR is already open #5

on:
push:
branches:
- master
workflow_dispatch:
permissions:
contents: write
pull-requests: write
issues: write
name: "Push to overleaf"
jobs:
update_sync_overleaf:
runs-on: ubuntu-latest
name: Update branch 'sync_overleaf'
steps:
- uses: actions/checkout@v4
with:
fetch-depth: '0'
- name: Push to overleaf
run: |
git remote add origin_token https://git:${GITHUB_TOKEN}@github.com/columnflow/demo_docs.git
git push origin_token HEAD:sync_overleaf
env:
OVERLEAF_TOKEN: ${{ secrets.OVERLEAF_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
update_overleaf:
runs-on: ubuntu-latest
name: Update overleaf
steps:
- uses: actions/checkout@v4
with:
ref: sync_overleaf
fetch-depth: '0'
- name: Push to overleaf
run: |
git remote add overleaf https://git:${OVERLEAF_TOKEN}@git.overleaf.com/65df171af9ff7989580f017d
git push overleaf HEAD:master
env:
OVERLEAF_TOKEN: ${{ secrets.OVERLEAF_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}