mirror of
https://github.com/davegallant/davegallant.github.io.git
synced 2025-08-07 00:58:13 +00:00
Add github actions deploy
This commit is contained in:
32
.github/workflows/gh-pages.yml
vendored
Normal file
32
.github/workflows/gh-pages.yml
vendored
Normal 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
2
.gitmodules
vendored
@@ -1,4 +1,4 @@
|
|||||||
[submodule "public"]
|
[submodule "public"]
|
||||||
path = public
|
path = public
|
||||||
url = git@github.com:davegallant/davegallant.github.io.git
|
url = git@github.com:davegallant/davegallant.github.io.git
|
||||||
branch = master
|
branch = main
|
||||||
|
3
Makefile
3
Makefile
@@ -21,8 +21,7 @@ deploy:
|
|||||||
git add .; \
|
git add .; \
|
||||||
msg="rebuilding site $$(date)"; \
|
msg="rebuilding site $$(date)"; \
|
||||||
git commit -m "$$msg"; \
|
git commit -m "$$msg"; \
|
||||||
git push origin main; \
|
git push origin main;
|
||||||
cd .. || exit;
|
|
||||||
|
|
||||||
## help: Print this help message
|
## help: Print this help message
|
||||||
help:
|
help:
|
||||||
|
2
public
2
public
Submodule public updated: c6d614fc82...f51840a468
Reference in New Issue
Block a user