-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (36 loc) · 1.08 KB
/
gh-pages.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
name: GitHub Pages Deployment
on:
push:
branches:
- main # Triggers the workflow on pushes to the main branch
jobs:
build-deploy:
runs-on: ubuntu-latest # Use GitHub-hosted runner
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
submodules: true # Include if using submodules
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: '3.8'
- name: Install Python Dependencies
run: |
pip install --upgrade pip
pip install packaging
- name: Run Build Script
run: python3 ./build.py
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.111.3' # Match the Hugo version used in GitLab
extended: false
- name: Build Site
run: hugo --minify
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
publish_branch: gh-pages