mirror of
https://github.com/kou029w/hasura-rest-hands-on.git
synced 2025-01-18 16:08:14 +00:00
36 lines
917 B
YAML
36 lines
917 B
YAML
name: github-pages
|
|
on:
|
|
workflow_run:
|
|
branches: [main]
|
|
workflows: [test]
|
|
types: [completed]
|
|
jobs:
|
|
main:
|
|
if: github.event.workflow_run.conclusion == 'success'
|
|
permissions:
|
|
pages: write
|
|
id-token: write
|
|
environment: github-pages
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-node@v2
|
|
with: { node-version: lts/*, cache: yarn }
|
|
- id: brew_cache
|
|
run: echo "::set-output name=dir::$(brew --cache)"
|
|
- uses: actions/cache@v2
|
|
with:
|
|
path: ${{ steps.brew_cache.outputs.dir }}
|
|
key: brew-v3
|
|
- name: Build assets
|
|
run: |
|
|
yarn install
|
|
yarn build
|
|
- name: Build book
|
|
run: |
|
|
brew bundle
|
|
mdbook build
|
|
- uses: actions/upload-pages-artifact@v1
|
|
with:
|
|
path: book
|
|
- uses: actions/deploy-pages@v1
|