From f530ceed38f32641a0a52d53209aa81dcde754ad Mon Sep 17 00:00:00 2001 From: Adrien Leravat Date: Sat, 10 Aug 2024 12:08:05 -0700 Subject: [PATCH] ci: automatically push new commits to deploy --- .github/workflows/push-to-internal.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/push-to-internal.yml diff --git a/.github/workflows/push-to-internal.yml b/.github/workflows/push-to-internal.yml new file mode 100644 index 0000000..a065e64 --- /dev/null +++ b/.github/workflows/push-to-internal.yml @@ -0,0 +1,22 @@ +name: Push to private deploy repository + +on: + push: + branches: + - '**' + +jobs: + push: + if: github.actor == github.repository_owner + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Push changes + env: + GITHUB_TOKEN: ${{ secrets.GH_PUSH }} + run: | + git remote add target https://${{ secrets.GH_PUSH }}@github.com/Meaningful-Code/meaningfulcode-deploy.git + git push target HEAD:${{ github.ref }}