-
Notifications
You must be signed in to change notification settings - Fork 4
50 lines (43 loc) · 929 Bytes
/
cicd.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
48
49
50
name: CICD
on:
push:
branches:
- main
pull_request:
branches:
- main
schedule:
- cron: 0 4 * * *
jobs:
pre_commit:
runs-on: ubuntu-latest
if: github.event_name != 'schedule'
steps:
- uses: actions/checkout@v2
- uses: pre-commit/[email protected]
build-deploy:
runs-on: ubuntu-latest
needs: pre_commit
steps:
- name: Checkout Repo
uses: actions/checkout@v2
with:
submodules: true
fetch-depth: 1
lfs: true
- uses: actions/setup-node@v3
with:
node-version: 19
- run: npm install
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: 0.112.3
- name: Build
run: hugo --minify
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
cname: jordismit.com