-
Notifications
You must be signed in to change notification settings - Fork 53
46 lines (43 loc) · 1.04 KB
/
docs-publish.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
name: Publish Site
on:
pull_request:
paths:
- docs/**
push:
branches:
- main
schedule:
- cron: 0 20 * * *
permissions:
contents: write
jobs:
build-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Install Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Setup Hugo
uses: peaceiris/actions-hugo@v3
with:
hugo-version: '0.111.0'
extended: true
- name: Install deps
run: |
npm install postcss-cli
npm install autoprefixer
- name: Build package docs
run: |
make BASE_URL=https://rancher.github.io/elemental-toolkit build-docs
- name: Deploy
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: public