-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (36 loc) · 1.19 KB
/
deploy.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
name: Build and Deploy
on:
push:
branches:
- main
schedule:
- cron: '0 0 1 1 *'
repository_dispatch:
types: [build-and-deploy]
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
with:
submodules: recursive # Fetch Hugo themes (true OR recursive)
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
- name: Setup Hugo
uses: peaceiris/actions-hugo@16361eb4acea8698b220b76c0d4e84e1fd22c61d # v2.6.0
with:
hugo-version: 'latest'
- name: Build
run: hugo --minify
- name: Copy CNAME and robots.txt
run: cp CNAME robots.txt public
# Deploy site
- name: Deploy
uses: JamesIves/github-pages-deploy-action@ec9c88baef04b842ca6f0a132fd61c762aa6c1b0 # v4.6.0
with:
token: ${{ secrets.DEPLOY_TOKEN }}
git-config-email: ${{ secrets.GIT_CONFIG_EMAIL }}
git-config-name: ${{ secrets.GIT_CONFIG_NAME }}
branch: github-pages
folder: public
repository-name: michael-valdron/michael-valdron.github.io
clean: true