mirror of
https://github.com/kou029w/github-and-codesandbox-guide.git
synced 2025-01-19 00:18:03 +00:00
Create github-pages action
This commit is contained in:
parent
84ece57901
commit
cb6b0edbc3
1 changed files with 20 additions and 0 deletions
20
.github/workflows/github-pages.yml
vendored
Normal file
20
.github/workflows/github-pages.yml
vendored
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
name: github-pages
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [master]
|
||||||
|
jobs:
|
||||||
|
main:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: build
|
||||||
|
run: |
|
||||||
|
git -c "user.name=bot" -c "user.email=bot@example" subtree add --prefix pages origin gh-pages
|
||||||
|
npx @marp-team/marp-cli README.md -o pages/index.html
|
||||||
|
- id: git_status
|
||||||
|
run: echo "::set-output name=mod::$(git status pages --porcelain)"
|
||||||
|
- name: push
|
||||||
|
if: steps.git_status.outputs.mod != ''
|
||||||
|
run: |
|
||||||
|
git -c "user.name=bot" -c "user.email=bot@example" commit -a -m update
|
||||||
|
git subtree push --prefix pages github gh-pages
|
Loading…
Add table
Reference in a new issue