diff --git a/templates/academic-cv/.devcontainer/devcontainer.json b/templates/academic-cv/.devcontainer/devcontainer.json new file mode 100644 index 00000000..ab001e26 --- /dev/null +++ b/templates/academic-cv/.devcontainer/devcontainer.json @@ -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 + ] +} \ No newline at end of file diff --git a/templates/academic-cv/.github/workflows/deploy.yml b/templates/academic-cv/.github/workflows/deploy.yml index 2c079035..7221e659 100644 --- a/templates/academic-cv/.github/workflows/deploy.yml +++ b/templates/academic-cv/.github/workflows/deploy.yml @@ -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