From 65ae329f54691af04ec03ff796c89be73eafa025 Mon Sep 17 00:00:00 2001 From: David Young Date: Wed, 3 Jun 2020 13:32:34 +1200 Subject: [PATCH] Let's try this oen --- .../on-push-master-update-leanpub-preview.yml | 26 ++++++++++++++----- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/.github/workflows/on-push-master-update-leanpub-preview.yml b/.github/workflows/on-push-master-update-leanpub-preview.yml index a044fba..f2b979b 100644 --- a/.github/workflows/on-push-master-update-leanpub-preview.yml +++ b/.github/workflows/on-push-master-update-leanpub-preview.yml @@ -17,11 +17,23 @@ jobs: - name: Checkout charts repo uses: actions/checkout@v2 - - name: Merge to leanpub-preview branch - uses: devmasx/merge-branch@v1.1.0 + - name: Checkout latest leanpub-preview branch + uses: actions/checkout@v2 + with: + repository: ${{ env.GITHUB_PAGES_REPO }} + ref: leanpub-preview + path: leanpub-preview + + - name: Replace contents of leanpub-preview branch + run: | + rm -rf leanpub-preview/* + cp -rf * leanpub-preview/ + cd leanpub-preview + ./scripts/markdown-to-markua.sh + + - name: Push changes + uses: ad-m/github-push-action@master with: - type: now - target_branch: 'leanpub-preview' - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - \ No newline at end of file + github_token: ${{ secrets.GITHUB_TOKEN }} + directory: leanpub-preview + branch: leanpub-preview \ No newline at end of file