-
Notifications
You must be signed in to change notification settings - Fork 6
47 lines (40 loc) · 1.29 KB
/
hugo.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
46
47
# Sample workflow for building and deploying a Hugo site to GitHub Pages
name: Deploy Hugo site to Pages
on:
push:
branches: ["master"] # Set a branch to deploy
pull_request:
# Default to bash
defaults:
run:
shell: bash
jobs:
deploy:
runs-on: ubuntu-22.04
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- uses: actions/checkout@v3
with:
submodules: true # Fetch Hugo themes (true OR recursive)
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.110.0'
# extended: true
- name: Build
run: hugo --minify
- name: Add CNAME
run: echo "cjug.org" > public/CNAME
- name: Commit to cjug.github.io repository
uses: cpina/github-action-push-to-another-repository@main
env:
SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }}
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
with:
source-directory: 'public'
destination-github-username: 'cjug'
destination-repository-name: 'cjug.github.io'
user-email: '[email protected]'
target-branch: master