1
0
mirror of https://github.com/funkypenguin/geek-cookbook/ synced 2026-02-11 23:01:46 +00:00
Files
geek-cookbook/.github/workflows/on-push-master-update-leanpub-preview.yml
2020-06-03 13:32:34 +12:00

39 lines
928 B
YAML

name: Update leanpub branches
on:
push:
branches:
- dev
paths:
- 'manuscript/*.md'
- 'manuscript/**/*.md'
- '.github/workflows/*'
jobs:
update-leanpub:
name: update-leanpub
runs-on: ubuntu-latest
steps:
- name: Checkout charts repo
uses: actions/checkout@v2
- 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:
github_token: ${{ secrets.GITHUB_TOKEN }}
directory: leanpub-preview
branch: leanpub-preview