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:
|
2023-10-01 00:38:46 +00:00
|
|
|
- uses: actions/checkout@v4
|
2023-11-01 10:39:20 +09:00
|
|
|
- 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
|