mirror of
https://github.com/kou029w/github-and-codesandbox-guide.git
synced 2025-01-18 16:08:07 +00:00
use actions/deploy-pages
This commit is contained in:
parent
09c6b8d844
commit
de2a18431a
1 changed files with 9 additions and 11 deletions
20
.github/workflows/github-pages.yml
vendored
20
.github/workflows/github-pages.yml
vendored
|
@ -4,17 +4,15 @@ on:
|
||||||
branches: [master]
|
branches: [master]
|
||||||
jobs:
|
jobs:
|
||||||
main:
|
main:
|
||||||
|
permissions:
|
||||||
|
pages: write
|
||||||
|
id-token: write
|
||||||
|
environment: github-pages
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: build
|
- run: npx @marp-team/marp-cli README.md -o pages/index.html
|
||||||
run: |
|
- uses: actions/upload-pages-artifact@v1
|
||||||
git -c "user.name=bot" -c "user.email=bot@example" subtree add --prefix pages origin gh-pages
|
with:
|
||||||
npx @marp-team/marp-cli README.md -o pages/index.html
|
path: pages
|
||||||
- id: git_status
|
- uses: actions/deploy-pages@v1
|
||||||
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 origin gh-pages
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue