Skip to content

Commit d0c3ea8

Browse files
author
Splitter
committed
ci: fix
1 parent 1ba1534 commit d0c3ea8

60 files changed

Lines changed: 3740 additions & 808 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.devcontainer/devcontainer.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"name": "HugoBlox Codespace",
3+
"image": "ghcr.io/HugoBlox/hugo-blox-dev:hugo0.154.2",
4+
"updateContentCommand": "pnpm install --frozen-lockfile --prefer-offline",
5+
"postCreateCommand": "pnpm --version && hugo version",
6+
"customizations": {
7+
"vscode": {
8+
"extensions": [
9+
"hugoblox.hugoblox-studio"
10+
]
11+
}
12+
},
13+
"mounts": [
14+
"source=pnpm-store,target=/home/vscode/.local/share/pnpm,type=volume"
15+
],
16+
"remoteUser": "vscode",
17+
"forwardPorts": [
18+
1313
19+
],
20+
"portsAttributes": {
21+
"1313": {
22+
"label": "Hugo Server"
23+
}
24+
}
25+
}

.editorconfig

Lines changed: 0 additions & 20 deletions
This file was deleted.

.github/preview.png

485 KB
Loading

.github/workflows/deploy.yml

Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
name: Deploy website to GitHub Pages
2+
3+
env:
4+
NODE_VERSION: '20'
5+
6+
on:
7+
# Trigger the workflow every time you push to the `main` branch
8+
push:
9+
branches: ['main']
10+
# Allows you to run this workflow manually from the Actions tab on GitHub
11+
workflow_dispatch:
12+
13+
# Provide permission to clone the repo and deploy it to GitHub Pages
14+
permissions:
15+
contents: read
16+
pages: write
17+
id-token: write
18+
19+
concurrency:
20+
group: 'pages'
21+
cancel-in-progress: false
22+
23+
jobs:
24+
# Build website
25+
build:
26+
if: github.repository_owner != 'HugoBlox'
27+
runs-on: ubuntu-latest
28+
steps:
29+
- name: Checkout
30+
uses: actions/checkout@v4
31+
with:
32+
# Fetch history for Hugo's .GitInfo and .Lastmod
33+
fetch-depth: 0
34+
35+
- name: Setup Node.js
36+
uses: actions/setup-node@v4
37+
with:
38+
node-version: ${{ env.NODE_VERSION }}
39+
40+
- name: Setup pnpm
41+
if: hashFiles('package.json') != ''
42+
uses: pnpm/action-setup@v4
43+
44+
- name: Get Hugo Version
45+
id: hugo-version
46+
run: |
47+
VERSION=$(grep "hugo_version" hugoblox.yaml | awk '{print $2}' | tr -d "'\"")
48+
echo "HUGO_VERSION=$VERSION" >> $GITHUB_ENV
49+
50+
- name: Install dependencies
51+
run: |
52+
# Install Tailwind CLI if package.json exists
53+
if [ -f "package.json" ]; then
54+
echo "Installing Tailwind dependencies..."
55+
pnpm install --no-frozen-lockfile || npm install
56+
fi
57+
58+
- name: Setup Hugo
59+
uses: peaceiris/actions-hugo@v3
60+
with:
61+
hugo-version: ${{ env.HUGO_VERSION }}
62+
extended: true
63+
64+
# Cache dependencies (Go modules, node_modules) - stable, rarely changes
65+
- uses: actions/cache@v4
66+
with:
67+
path: |
68+
/tmp/hugo_cache_runner/
69+
node_modules/
70+
modules/*/node_modules/
71+
key: ${{ runner.os }}-hugo-deps-${{ hashFiles('**/go.mod', '**/package-lock.json',
72+
'**/pnpm-lock.yaml') }}
73+
restore-keys: |
74+
${{ runner.os }}-hugo-deps-
75+
76+
# Cache Hugo resources (processed images, CSS) - invalidates only when assets/config change
77+
- uses: actions/cache@v4
78+
with:
79+
path: resources/
80+
key: ${{ runner.os }}-hugo-resources-${{ hashFiles('assets/**/*', 'config/**/*',
81+
'hugo.yaml', 'package.json') }}
82+
restore-keys: |
83+
${{ runner.os }}-hugo-resources-
84+
85+
- name: Setup Pages
86+
id: pages
87+
uses: actions/configure-pages@v5
88+
89+
- name: Build with Hugo
90+
env:
91+
HUGO_ENVIRONMENT: production
92+
HUGO_BLOX_LICENSE: ${{ secrets.HUGO_BLOX_LICENSE }}
93+
run: |
94+
echo "Hugo Cache Dir: $(hugo config | grep cachedir)"
95+
hugo --minify --baseURL "${{ steps.pages.outputs.base_url }}/"
96+
97+
- name: Generate Pagefind search index (if applicable)
98+
run: |
99+
# Check if site uses Pagefind search
100+
if [ -f "package.json" ] && grep -q "pagefind" package.json; then
101+
pnpm run pagefind || npx pagefind --site "public"
102+
fi
103+
104+
- name: Upload artifact
105+
uses: actions/upload-pages-artifact@v4
106+
with:
107+
path: ./public
108+
109+
# Deploy website to GitHub Pages hosting
110+
deploy:
111+
if: github.repository_owner != 'HugoBlox'
112+
needs: build
113+
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
114+
permissions:
115+
pages: write # to deploy to Pages
116+
id-token: write # to verify the deployment originates from an appropriate source
117+
# Deploy to the github-pages environment
118+
environment:
119+
name: github-pages
120+
url: ${{ steps.deployment.outputs.page_url }}
121+
runs-on: ubuntu-latest
122+
steps:
123+
- name: Deploy to GitHub Pages
124+
id: deployment
125+
uses: actions/deploy-pages@v4

.github/workflows/publish.yaml

Lines changed: 0 additions & 70 deletions
This file was deleted.

.gitignore

Lines changed: 67 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,69 @@
1-
# IDEs
2-
.idea/
1+
# ============================================================================
2+
# Hugo Site .gitignore
3+
# ============================================================================
34

4-
# Hugo
5-
resources/
5+
# ============================================================================
6+
# Hugo Build Artifacts
7+
# ============================================================================
8+
9+
# Generated site output
610
public/
7-
assets/jsconfig.json
11+
12+
# Hugo resources (processed assets)
13+
resources/
14+
15+
# Hugo build lock
16+
.hugo_build.lock
17+
18+
# Hugo stats
19+
hugo_stats.json
20+
21+
# Auto-generated JS config
22+
**/assets/jsconfig.json
23+
24+
# ============================================================================
25+
# Node.js & Package Managers
26+
# ============================================================================
27+
28+
# Dependencies
29+
node_modules/
30+
31+
# ============================================================================
32+
# Environment & Configuration
33+
# ============================================================================
34+
35+
# Environment variables
36+
.env
37+
.env.local
38+
.env.*.local
39+
40+
# ============================================================================
41+
# Generated Content
42+
# ============================================================================
43+
44+
# Pagefind search index
45+
pagefind/
46+
static/pagefind/
47+
48+
# ============================================================================
49+
# Operating System
50+
# ============================================================================
51+
52+
# macOS
53+
.DS_Store
54+
.DS_Store?
55+
._*
56+
57+
# Windows
58+
Thumbs.db
59+
Desktop.ini
60+
61+
# Linux
62+
*~
63+
64+
# ============================================================================
65+
# Logs & Temporary Files
66+
# ============================================================================
67+
68+
*.log
69+
npm-debug.log*

LICENSE.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2023-present George Cushen (https://neuralgeo.com/)
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)