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]
|
||||
jobs:
|
||||
main:
|
||||
permissions:
|
||||
pages: write
|
||||
id-token: write
|
||||
environment: github-pages
|
||||
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 origin gh-pages
|
||||
- run: npx @marp-team/marp-cli README.md -o pages/index.html
|
||||
- uses: actions/upload-pages-artifact@v1
|
||||
with:
|
||||
path: pages
|
||||
- uses: actions/deploy-pages@v1
|
||||
|
|
Loading…
Add table
Reference in a new issue