-
Notifications
You must be signed in to change notification settings - Fork 44
39 lines (38 loc) · 1007 Bytes
/
janode-docs.yml
File metadata and controls
39 lines (38 loc) · 1007 Bytes
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
name: Deploy to GitHub Pages
on:
push:
branches:
- master
- test-docs
tags:
- v1.*
jobs:
build-and-deploy:
permissions:
contents: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
runs-on: ubuntu-24.04
env:
REF_NAME: ${{ github.ref_name }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: lts/jod
- run: npm ci
- run: npm run build-docs
- name: Add git reference to docs path
run: |
mkdir -p site/docs/$REF_NAME
cp -a docs/. site/docs/$REF_NAME
- name: Update "latest" docs for tagged versions
if: startsWith(github.ref, 'refs/tags/v')
run: |
cp -a docs/. site/docs/latest
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./site
keep_files: true