-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (43 loc) · 1.07 KB
/
deploy.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# SPDX-FileCopyrightText: 2023 Shun Sakai
#
# SPDX-License-Identifier: Apache-2.0 OR MIT
name: Deployment
on:
pull_request:
push:
branches:
- "develop"
tags:
- "*-v[0-9]+.[0-9]+.[0-9]+"
permissions:
contents: write
jobs:
deploy:
name: Deploy
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: 20
cache: "npm"
- name: Install dependencies
run: |
npm ci
npx antora -v
- name: Setup just
uses: extractions/setup-just@v2
- name: Build a book
run: just build-book
- name: Minify a book
uses: docker://tdewolff/minify:latest
with:
args: --exclude "build/site/_/**" -o build/ -r build/
- name: Deploy
uses: peaceiris/[email protected]
if: startsWith(github.ref, 'refs/tags/')
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: build/site