-
Notifications
You must be signed in to change notification settings - Fork 14
53 lines (44 loc) · 1.37 KB
/
Copy pathgithub-pages.yml
File metadata and controls
53 lines (44 loc) · 1.37 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
name: Build and Deploy KubeFleet Website to GitHub Pages
on:
push:
branches:
- main
pull_request:
permissions:
contents: write
jobs:
build-and-deploy:
# The latest tag of the Ubuntu image points to the latest LTS version of Ubuntu, as specified on the Docker Hub.
runs-on: ubuntu-latest
# Run only one build + deploy attempt at a time.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- uses: actions/checkout@v4
with:
# Fetch all the submodules (e.g., docsy theme).
submodules: recursive
# Fetch full git history for git integration features on the website.
fetch-depth: 0
- name: Setup Hugo
uses: peaceiris/actions-hugo@v3
with:
hugo-version: '0.161.1'
extended: true
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '24'
- name: Install dependencies from NPM
run: npm install
- name: Build
run: hugo --minify
- name: Add CNAME file
run: echo 'kubefleet.dev' > ./public/CNAME
- name: Deploy
uses: peaceiris/actions-gh-pages@v4
# Skip this step if it is triggered by a PR.
if: github.ref == 'refs/heads/main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public