hasura-rest-hands-on/.github/workflows/github-pages.yml

38 lines
970 B
YAML
Raw Normal View History

2021-07-16 22:11:10 +09:00
name: github-pages
on:
2022-03-02 16:25:03 +09:00
workflow_run:
2021-07-16 22:11:10 +09:00
branches: [main]
2022-03-02 16:25:03 +09:00
workflows: [test]
types: [completed]
2021-07-16 22:11:10 +09:00
jobs:
main:
2022-03-02 16:25:03 +09:00
if: github.event.workflow_run.conclusion == 'success'
2022-08-01 18:00:31 +09:00
permissions:
pages: write
id-token: write
environment: github-pages
2021-07-16 22:11:10 +09:00
runs-on: ubuntu-latest
steps:
2022-09-01 01:14:31 +00:00
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
2022-03-02 16:25:03 +09:00
with: { node-version: lts/*, cache: yarn }
- uses: Homebrew/actions/setup-homebrew@master
2021-07-17 11:23:29 +09:00
- id: brew_cache
run: echo "::set-output name=dir::$(brew --cache)"
2022-09-01 01:14:31 +00:00
- uses: actions/cache@v3
2021-07-17 11:23:29 +09:00
with:
path: ${{ steps.brew_cache.outputs.dir }}
2022-08-01 17:46:29 +09:00
key: brew-v3
2022-03-02 16:25:03 +09:00
- name: Build assets
run: |
yarn install
yarn build
- name: Build book
run: |
brew bundle
mdbook build
2023-08-01 02:46:21 +00:00
- uses: actions/upload-pages-artifact@v2
2022-08-01 18:00:31 +09:00
with:
path: book
- uses: actions/deploy-pages@v2