1
0
mirror of https://github.com/funkypenguin/geek-cookbook/ synced 2025-12-13 17:56:26 +00:00

Prevent markdown formatting from breaking leanpub render

This commit is contained in:
David Young
2020-06-04 09:57:15 +12:00
committed by GitHub
parent 9c0b3942a5
commit 418ca08c08
10 changed files with 134 additions and 111 deletions

View File

@@ -1,4 +1,4 @@
name: Notify Discord to cookbook update
name: Update leanpub branches
on:
push:
@@ -7,16 +7,42 @@ on:
paths:
- 'manuscript/*.md'
- 'manuscript/**/*.md'
- '.github/workflows/*'
- 'scripts/*'
jobs:
update-leanpub:
name: update-leanpub
runs-on: ubuntu-latest
steps:
- 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/manuscript
rm -rf leanpub-preview/scripts
cp -rf manuscript leanpub-preview/
cp -rf scripts leanpub-preview/
cd leanpub-preview
./scripts/markdown-to-markua.sh
git config --local --unset-all "http.https://github.com/.extraheader"
git config --global user.email "autopenguin@funkypenguin.co.nz"
git config --global user.name "AutoPenguin"
git add .
git commit -m 'Update for leanpub preview'
- name: Push changes
uses: ad-m/github-push-action@master
with:
type: now
target_branch: 'leanpub-preview'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
github_token: ${{ secrets.GITHUB_TOKEN }}
directory: leanpub-preview
branch: leanpub-preview