-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (51 loc) · 1.29 KB
/
publish.yml
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
48
49
50
51
52
53
name: Publish
# Publish npm and dockerhub when Release Pull Request is merged
#
# https://hub.docker.com/r/honkit/honkit
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-24.04
permissions:
contents: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 22
- name: Restore npm cache
id: restore-cache
uses: actions/cache@v4
with:
path: node_modules
key: js-depend-${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
- name: npm install
if: steps.restore-cache.outputs.cache-hit != 'true'
run: npm install
- name: build docs
run: npx honkit build
- run: touch _book/.nojekyll
- name: Deploy
uses: actions/upload-pages-artifact@v1
with:
path: _book
deploy:
runs-on: ubuntu-24.04
needs: build
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v3