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

32 lines
719 B
YAML
Raw Permalink 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
2024-01-29 17:03:32 +09:00
container: node:lts-alpine
2021-07-16 22:11:10 +09:00
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
2021-07-17 11:23:29 +09:00
with:
2024-01-29 17:03:32 +09:00
node-version: "lts/*"
cache: npm
- name: Build
2022-03-02 16:25:03 +09:00
run: |
2024-01-29 17:03:32 +09:00
apk add mdbook tar
npm ci
npm run build
2022-03-02 16:25:03 +09:00
mdbook build
2024-01-29 17:03:32 +09:00
- uses: actions/upload-pages-artifact@v3
2022-08-01 18:00:31 +09:00
with:
path: book
2024-01-29 17:03:32 +09:00
- uses: actions/deploy-pages@v4