tpl: add devcontainer

This commit is contained in:
George Cushen committed 2025-12-05 21:31:13 +00:00
1 parent 75cae004f6
commit 75234c306b
2 files changed
+29 -2

No files matched your search

@@ -0,0 +1,22 @@
{
"image": "mcr.microsoft.com/devcontainers/go:1",
"features": {
"ghcr.io/devcontainers/features/hugo:1": {
"extended": true,
"version": "0.152.2"
},
"ghcr.io/devcontainers/features/node:1": {}
},
"customizations": {
"vscode": {
"extensions": [
"hugoblox.hugoblox-studio"
]
}
},
"postCreateCommand": "pnpm install --no-frozen-lockfile && hugo --logLevel debug && pnpm dlx pagefind --source 'public' --verbose",
"postAttachCommand": "(code --command workbench.view.extension.hugoblox-studio || true) && hugo server --disableFastRender -D --port 1313",
"forwardPorts": [
1313
]
}
+7 -2
View File
@@ -1,7 +1,6 @@
name: Deploy website to GitHub Pages
env:
WC_HUGO_VERSION: '0.152.2'
NODE_VERSION: '20'
on:
@@ -42,6 +41,12 @@ jobs:
if: hashFiles('package.json') != ''
uses: pnpm/action-setup@v4
- name: Get Hugo Version
id: hugo-version
run: |
VERSION=$(grep "hugo_version" hugoblox.yaml | awk '{print $2}' | tr -d "'\"")
echo "HUGO_VERSION=$VERSION" >> $GITHUB_ENV
- name: Install dependencies
run: |
# Install Tailwind CLI if package.json exists
@@ -53,7 +58,7 @@ jobs:
- name: Setup Hugo
uses: peaceiris/actions-hugo@v3
with:
hugo-version: ${{ env.WC_HUGO_VERSION }}
hugo-version: ${{ env.HUGO_VERSION }}
extended: true
# Cache dependencies (Go modules, node_modules) - stable, rarely changes