mirror of
https://github.com/kou029w/hasura-rest-hands-on.git
synced 2025-02-22 16:45:54 +00:00
use actions/deploy-pages
This commit is contained in:
parent
aa8504b7dd
commit
e7c64390e8
1 changed files with 8 additions and 11 deletions
19
.github/workflows/github-pages.yml
vendored
19
.github/workflows/github-pages.yml
vendored
|
@ -7,6 +7,10 @@ on:
|
||||||
jobs:
|
jobs:
|
||||||
main:
|
main:
|
||||||
if: github.event.workflow_run.conclusion == 'success'
|
if: github.event.workflow_run.conclusion == 'success'
|
||||||
|
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
|
||||||
|
@ -18,11 +22,6 @@ jobs:
|
||||||
with:
|
with:
|
||||||
path: ${{ steps.brew_cache.outputs.dir }}
|
path: ${{ steps.brew_cache.outputs.dir }}
|
||||||
key: brew-v3
|
key: brew-v3
|
||||||
- name: Git config
|
|
||||||
run: |
|
|
||||||
git config user.name bot
|
|
||||||
git config user.email bot@example
|
|
||||||
git subtree add --prefix book origin gh-pages
|
|
||||||
- name: Build assets
|
- name: Build assets
|
||||||
run: |
|
run: |
|
||||||
yarn install
|
yarn install
|
||||||
|
@ -31,9 +30,7 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
brew bundle
|
brew bundle
|
||||||
mdbook build
|
mdbook build
|
||||||
- name: Publish
|
- uses: actions/upload-pages-artifact@v1
|
||||||
run: |
|
with:
|
||||||
git add -f book
|
path: book
|
||||||
if git commit -m update; then
|
- uses: actions/deploy-pages@v1
|
||||||
git subtree push --prefix book origin gh-pages
|
|
||||||
fi
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue