-
Notifications
You must be signed in to change notification settings - Fork 15
68 lines (63 loc) · 1.5 KB
/
website.yaml
File metadata and controls
68 lines (63 loc) · 1.5 KB
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Drasi Website
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
branches:
- main
- feature-lib
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
name: Build Hugo Website
if: github.event.action != 'closed'
runs-on: ubuntu-latest
env:
HUGO_VERSION: 0.152.2
steps:
- name: Checkout docs repo
uses: actions/checkout@v4
with:
submodules: true
lfs: true
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '22'
- name: Setup Hugo
uses: peaceiris/actions-hugo@v3.0.0
with:
hugo-version: ${{ env.HUGO_VERSION }}
extended: true
- name: Setup Docsy
run: |
cd docs
sudo npm install -D --save autoprefixer
sudo npm install -D --save postcss-cli
cd themes/docsy
npm install
- name: Build Hugo Site
run: |
cd docs
hugo --baseURL "https://drasi.io/"
- name: Upload GitHub Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./docs/public/
deploy:
name: Deploy to GitHub Pages
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
needs: build
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4