-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (38 loc) · 1.06 KB
/
publish.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: Push to GitHub Pages on push to main
on:
schedule:
# every day at midnight: https://crontab.guru/every-midnight
- cron: '0 0 * * *'
# Trigger the workflow on push or pull request for master branch
push:
branches:
- main
pull_request:
branches:
- main
# Manually trigger workflow
workflow_dispatch:
jobs:
build:
name: Deploy
runs-on: ubuntu-latest
steps:
- name: Checkout main
uses: actions/checkout@v1
- name: Build hugo page
run: |
wget https://github.com/gohugoio/hugo/releases/download/v0.88.1/hugo_extended_0.88.1_Linux-64bit.deb
sudo dpkg -i hugo*.deb
rm -rf public 2> /dev/null
rm *.deb
hugo --debug --path-warnings
touch public/.nojekyll
# Deploy to local repo
- name: Deploy
if: github.ref == 'refs/heads/main'
uses: s0/git-publish-subdir-action@develop
env:
REPO: self
BRANCH: gh-pages
FOLDER: public
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}