From 7963282f62596d0253d770f8902421e033ed6654 Mon Sep 17 00:00:00 2001 From: Philip Keicher Date: Wed, 16 Oct 2024 12:36:49 +0200 Subject: [PATCH] action to syncronize with overleaf every 5 min --- .github/workflows/sync_overleaf.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/sync_overleaf.yml diff --git a/.github/workflows/sync_overleaf.yml b/.github/workflows/sync_overleaf.yml new file mode 100644 index 0000000..fa19d52 --- /dev/null +++ b/.github/workflows/sync_overleaf.yml @@ -0,0 +1,23 @@ +on: + schedule: + - cron: "*/5 * * * *" + workflow_dispatch: + +name: "Sync overleaf" +jobs: + sync: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Sync overleaf + run: | + git remote add overleaf https://git:${OVERLEAF_TOKEN}@git.overleaf.com/65df171af9ff7989580f017d + git remote add origin_token https://git:${GITHUB_TOKEN}@github.com/columnflow/demo_documentation.git + + git fetch overleaf + git pull overleaf master + git push origin_token HEAD:sync_overleaf + + env: + OVERLEAF_TOKEN: ${{ secrets.OVERLEAF_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}