-
Notifications
You must be signed in to change notification settings - Fork 3
57 lines (48 loc) · 1.24 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Deploy
# -----
# This workflow will run whenever changes are pushed to master
# -----
on:
push:
branches:
- master
jobs:
build:
name: Deploy
runs-on: ubuntu-latest
steps:
# -----
# Grab the latest source
# -----
- name: Checkout
uses: actions/checkout@v2
# -----
# Install Hugo: https://github.com/peaceiris/actions-hugo
# -----
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: 'latest'
extended: true
# -----
# Generate site content
# -----
- name: Generate Content
run: hugo
# -----
# Create our nice commit
# -----
- name: Commit Files
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
CURRENTDATE=`date +"%m/%d/%Y %H:%M"`
git add .
git commit -am "Deploy ${CURRENTDATE} 🚀"
# -----
# Push changes using the action github token: https://github.com/ad-m/github-push-action
# -----
- name: Push Changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}