Add github actions deploy

This commit is contained in:
Dave Gallant
2021-09-05 23:08:23 -04:00
parent 2b1fcb6ac4
commit 6b5bd7047f
4 changed files with 35 additions and 4 deletions

32
.github/workflows/gh-pages.yml vendored Normal file
View File

@@ -0,0 +1,32 @@
name: github pages
on:
push:
branches:
- main # Set a branch to deploy
pull_request:
jobs:
deploy:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
submodules: true # Fetch Hugo themes (true OR recursive)
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: 'latest'
# extended: true
- name: Build
run: hugo --minify
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public

2
.gitmodules vendored
View File

@@ -1,4 +1,4 @@
[submodule "public"]
path = public
url = git@github.com:davegallant/davegallant.github.io.git
branch = master
branch = main

View File

@@ -21,8 +21,7 @@ deploy:
git add .; \
msg="rebuilding site $$(date)"; \
git commit -m "$$msg"; \
git push origin main; \
cd .. || exit;
git push origin main;
## help: Print this help message
help:

2
public

Submodule public updated: c6d614fc82...f51840a468