Create deploy-site.yaml
This commit is contained in:
parent
ddbb4bf7ce
commit
c0493615ee
1 changed files with 36 additions and 0 deletions
36
.github/workflows/deploy-site.yaml
vendored
Normal file
36
.github/workflows/deploy-site.yaml
vendored
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
name: Deploy to Github Pages
|
||||||
|
|
||||||
|
# run when a commit is pushed to "source" branch
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- source
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
deploy:
|
||||||
|
runs-on: ubuntu-18.04
|
||||||
|
steps:
|
||||||
|
# checkout to the commit that has been pushed
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
submodules: true # Fetch Hugo themes (true OR recursive)
|
||||||
|
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
|
||||||
|
|
||||||
|
# install Hugo
|
||||||
|
- name: Setup Hugo
|
||||||
|
uses: peaceiris/actions-hugo@v2
|
||||||
|
with:
|
||||||
|
hugo-version: '0.77.0'
|
||||||
|
extended: true
|
||||||
|
|
||||||
|
# build website
|
||||||
|
- name: Build
|
||||||
|
run: hugo --minify
|
||||||
|
|
||||||
|
# push the generated content into the `main` (former `master`) branch.
|
||||||
|
- name: Deploy
|
||||||
|
uses: peaceiris/actions-gh-pages@v3
|
||||||
|
with:
|
||||||
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
publish_branch: main # if your main branch is `master` use that here.
|
||||||
|
publish_dir: ./public
|
Loading…
Add table
Add a link
Reference in a new issue