Skip to content

Commit

Permalink
Add publish workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
davegallant committed Jan 2, 2024
1 parent 66cff08 commit 9682ff8
Show file tree
Hide file tree
Showing 331 changed files with 745 additions and 2,087 deletions.
87 changes: 87 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
name: Publish Hugo Site

on:
push:
branches:
- main
paths-ignore:
- templates/**

workflow_run:
workflows: ["Update Projects Page"]
types:
- completed

jobs:
update_hugo_npm_dependencies:
name: Update Hugo npm Dependencies
runs-on: ubuntu-latest
permissions:
contents: write
outputs:
commit_hash: ${{ steps.commit_changes.outputs.commit_hash }}
steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Install Node
uses: actions/setup-node@v4
with:
node-version: "18"

- name: Install Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: "0.111.3"
extended: true

- name: Write composite package.json
run: hugo mod npm pack

- name: Install npm Packages
run: npm install

- name: Display Changes
run: git status

- name: Commit Changes
id: commit_changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Update Hugo npm Dependencies

publish:
name: Publish Hugo Site
needs: update_hugo_npm_dependencies
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ needs.update_hugo_npm_dependencies.outputs.commit_hash }}

- name: Install Node
uses: actions/setup-node@v4
with:
node-version: "18"

- name: Install Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: "0.111.3"
extended: true

- name: Install npm Packages
run: npm ci

- name: Build Hugo
run: hugo --minify

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "themes/hugo-video"]
path = themes/hugo-video
url = https://github.com/martignoni/hugo-video.git
32 changes: 30 additions & 2 deletions config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
baseurl: "https://davegallant.ca"
languageCode: en-us
baseURL: /
googleAnalytics: G-V8WJDERTX9
copyright: Dave Gallant
enableGitInfo: true
enableRobotsTXT: true
noJSConfigInAssets: true

params:
author: Dave Gallant
Expand All @@ -20,6 +22,27 @@ params:
username: davegallant
repository: davegallant.github.io

prism:
languages:
- markup
- css
- clike
- javascript
- bash
- csharp
- hcl
- ignore
- json
- markdown
- powershell
- toml
- yaml
plugins:
- normalize-whitespace
- toolbar
- copy-to-clipboard
- command-line

menu:
main:
- name: RSS
Expand All @@ -29,6 +52,11 @@ menu:
permalinks:
post: "/blog/:year/:month/:day/:slug/"

markup:
goldmark:
renderer:
unsafe: true

module:
imports:
- path: github.com/davegallant/hugo-theme-gruvbox
Expand Down
10 changes: 10 additions & 0 deletions content/about.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
title: About
weight: -210
disable_comments: true
hide_date: true
---

I'm a software tinkerer with a passion for infrastructure, tooling, security, and coffee.

Feel free to reach out at [me@davegallant.ca](mailto:me@davegallant.ca).
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ There are a number of reasons why you might want to replace docker, especially o

<!--more-->

{{< tweet 1388586550682861568 >}}
{{< tweet user="moyix" id="1388586550682861568" >}}

Docker has been one of the larger influencers in the container world, helping to standardize the [OCI Image Format Specification](https://github.com/opencontainers/image-spec/blob/main/spec.md). For many developers, containers have become synonymous with terms like `docker` and `Dockerfile` (a file containing build instructions for a container image). Docker has certainly made it very convenient to build and run containers, but it is not the only solution for doing so.

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module davegallant.github.io

go 1.21.5
go 1.23

require (
github.com/davegallant/hugo-theme-gruvbox v0.0.0-20240102030224-3e3d39381e83 // indirect
Expand Down
Loading

0 comments on commit 9682ff8

Please sign in to comment.