-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (41 loc) · 1.17 KB
/
main.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
name: Deploy Project
on:
push:
branches: master
jobs:
gh-release:
runs-on: ubuntu-22.04
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v3
with:
lfs: true
submodules: true # Fetch Hugo themes (true OR recursive)
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '16.x'
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.85.0'
- name: Install and Build
run: |
git config --global user.name "Azderica"
git config --global user.email mh97888@gmail.com
# npm ci
npm install
npm run build
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
user_email: 'mh97888@gmail.com'
user_name: 'Azderica'
github_token: ${{ secrets.ACCESS_TOKEN }}
publish_branch: gh-pages
publish_dir: ./dist # The folder the action should deploy.
cname: github.com
allow_empty_commit: true