Skip to content

Commit c633bb8

Browse files
authored
chore: remove disabled NuxtHub workflow (#89)
## Summary - Remove `nuxthub.yml` workflow file that was previously disabled - Workflow no longer needed after GCP Cloud Run migration ## Context GitHub Actions still processes workflow files even when fully commented out, causing unnecessary workflow runs. Since the project has migrated to GCP Cloud Run deployment, the NuxtHub workflow is obsolete. ## Related - Migration to GCP tracked in #88
2 parents 4ecdabe + 2b384b1 commit c633bb8

Some content is hidden

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

44 files changed

+2455
-479
lines changed

.changeset/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Changesets
2+
3+
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
4+
with multi-package repos, or single-package repos to help you version and publish your code. You can
5+
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
6+
7+
We have a quick list of common questions to get you started engaging with this project in
8+
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)

.changeset/config.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
3+
"changelog": ["@changesets/changelog-github", { "repo": "ChrisTowles/blog" }],
4+
"commit": false,
5+
"fixed": [],
6+
"linked": [],
7+
"access": "restricted",
8+
"baseBranch": "main",
9+
"updateInternalDependencies": "patch",
10+
"ignore": []
11+
}

.claude/skills/hosting/README.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Hosting Skill
2+
3+
Claude Code skill for deploying and managing the blog on Google Cloud Platform Cloud Run.
4+
5+
## Purpose
6+
7+
Provides commands and workflows for:
8+
- Building and deploying Docker containers to GCP
9+
- Viewing logs and monitoring application status
10+
- Managing environment variables and secrets
11+
- Rolling back deployments
12+
13+
## Usage
14+
15+
Invoke this skill in Claude Code with `/hosting` or reference commands from `skill.md`.
16+
17+
## Prerequisites
18+
19+
- `gcloud` CLI installed and authenticated
20+
- Access to `blog-chris-towles` GCP project
21+
- Docker (for local testing)
22+
23+
## Quick Start
24+
25+
Deploy the blog:
26+
```bash
27+
# Build and push
28+
cd packages/blog
29+
gcloud builds submit --tag us-central1-docker.pkg.dev/blog-chris-towles/blog-images/blog:latest
30+
31+
# Deploy
32+
gcloud run deploy blog \
33+
--image us-central1-docker.pkg.dev/blog-chris-towles/blog-images/blog:latest \
34+
--region us-central1 \
35+
--project=blog-chris-towles
36+
```
37+
38+
## Related Documentation
39+
40+
- [Migration Plan](../../../docs/plans/migrate-to-google-cloud.md)
41+
- [GCP Cloud Run Docs](https://cloud.google.com/run/docs)

.claude/skills/hosting/skill.md

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
# Hosting Skill - GCP Cloud Run Deployment
2+
3+
This skill helps deploy and manage the blog on Google Cloud Platform Cloud Run.
4+
5+
## Commands
6+
7+
### Deploy to GCP Cloud Run
8+
9+
To deploy the blog to GCP:
10+
11+
1. Build and push Docker image to Artifact Registry:
12+
```bash
13+
cd packages/blog
14+
gcloud builds submit \
15+
--tag us-central1-docker.pkg.dev/blog-chris-towles/blog-images/blog:latest \
16+
--project=blog-chris-towles
17+
```
18+
19+
2. Deploy to Cloud Run:
20+
```bash
21+
gcloud run deploy blog \
22+
--image us-central1-docker.pkg.dev/blog-chris-towles/blog-images/blog:latest \
23+
--platform managed \
24+
--region us-central1 \
25+
--add-cloudsql-instances blog-chris-towles:us-central1:blog-db \
26+
--allow-unauthenticated \
27+
--project=blog-chris-towles
28+
```
29+
30+
### View Logs
31+
32+
View application logs from Cloud Run:
33+
```bash
34+
gcloud run logs read blog --region=us-central1 --project=blog-chris-towles
35+
```
36+
37+
Follow logs in real-time:
38+
```bash
39+
gcloud run logs tail blog --region=us-central1 --project=blog-chris-towles
40+
```
41+
42+
### Check Status
43+
44+
Check service status and configuration:
45+
```bash
46+
gcloud run services describe blog --region=us-central1 --project=blog-chris-towles
47+
```
48+
49+
List all Cloud Run services:
50+
```bash
51+
gcloud run services list --project=blog-chris-towles
52+
```
53+
54+
Get service URL:
55+
```bash
56+
gcloud run services describe blog --region=us-central1 --project=blog-chris-towles --format='value(status.url)'
57+
```
58+
59+
### Manage Environment Variables
60+
61+
Set environment variables:
62+
```bash
63+
gcloud run services update blog \
64+
--set-env-vars="KEY1=value1,KEY2=value2" \
65+
--region=us-central1 \
66+
--project=blog-chris-towles
67+
```
68+
69+
View current environment variables:
70+
```bash
71+
gcloud run services describe blog --region=us-central1 --project=blog-chris-towles --format='value(spec.template.spec.containers[0].env)'
72+
```
73+
74+
### Rollback
75+
76+
List revisions:
77+
```bash
78+
gcloud run revisions list --service=blog --region=us-central1 --project=blog-chris-towles
79+
```
80+
81+
Rollback to a previous revision:
82+
```bash
83+
gcloud run services update-traffic blog \
84+
--to-revisions=REVISION_NAME=100 \
85+
--region=us-central1 \
86+
--project=blog-chris-towles
87+
```
88+
89+
## Project Configuration
90+
91+
- **Project ID**: blog-chris-towles
92+
- **Region**: us-central1
93+
- **Service Name**: blog
94+
- **Image Registry**: us-central1-docker.pkg.dev/blog-chris-towles/blog-images
95+
- **Database**: Cloud SQL PostgreSQL (blog-db)
96+
97+
## Usage Notes
98+
99+
- Cloud Run auto-scales from 0 to configured max instances
100+
- Cold starts occur when scaling from 0
101+
- Secrets should be managed via Secret Manager, not environment variables
102+
- Database connections use Cloud SQL Proxy automatically when configured

.dockerignore

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Dependencies
2+
node_modules
3+
.pnpm-store
4+
5+
# Build outputs
6+
.output
7+
.nuxt
8+
dist
9+
build
10+
.next
11+
12+
# Environment files
13+
.env
14+
.env.local
15+
.env.*.local
16+
17+
# IDE
18+
.vscode
19+
.idea
20+
*.swp
21+
*.swo
22+
*~
23+
24+
# OS
25+
.DS_Store
26+
Thumbs.db
27+
28+
# Git
29+
.git
30+
.gitignore
31+
.gitattributes
32+
33+
# CI/CD
34+
.github
35+
.gitlab-ci.yml
36+
37+
# Testing
38+
coverage
39+
.nyc_output
40+
*.log
41+
42+
# Misc
43+
*.md
44+
!packages/blog/content/**/*.md
45+
.editorconfig
46+
.eslintrc*
47+
.prettierrc*
48+
tsconfig.json
49+
50+
# Slides package (not needed for blog)
51+
packages/slides
52+
53+
# Infrastructure
54+
infra
55+
56+
# Docs
57+
docs

.github/workflows/nuxthub.yml

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

.github/workflows/release.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
concurrency: ${{ github.workflow }}-${{ github.ref }}
9+
10+
permissions:
11+
contents: write
12+
pull-requests: write
13+
id-token: write
14+
15+
jobs:
16+
release:
17+
name: Release
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
with:
23+
fetch-depth: 0
24+
25+
- name: Install pnpm
26+
uses: pnpm/action-setup@v4
27+
28+
- name: Setup Node.js
29+
uses: actions/setup-node@v4
30+
with:
31+
node-version: 24
32+
cache: 'pnpm'
33+
34+
- name: Install dependencies
35+
run: pnpm install
36+
37+
- name: Create Release Pull Request or Publish
38+
id: changesets
39+
uses: changesets/action@v1
40+
with:
41+
version: pnpm run version
42+
publish: pnpm run release
43+
commit: 'chore: version packages'
44+
title: 'chore: version packages'
45+
env:
46+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Dockerfile

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Build stage
2+
FROM node:24-slim AS builder
3+
4+
# Install build dependencies for native modules (better-sqlite3)
5+
RUN apt-get update && apt-get install -y python3 make g++ && rm -rf /var/lib/apt/lists/*
6+
7+
# Install pnpm
8+
RUN corepack enable && corepack prepare pnpm@latest --activate
9+
10+
# Set working directory
11+
WORKDIR /app
12+
13+
# Copy workspace configuration
14+
COPY package.json pnpm-workspace.yaml pnpm-lock.yaml ./
15+
16+
# Copy package files for all workspaces
17+
COPY packages/blog/package.json ./packages/blog/
18+
19+
# Install dependencies with cache mount and shamefully hoist for Docker compatibility
20+
RUN --mount=type=cache,id=pnpm,target=/root/.local/share/pnpm/store \
21+
pnpm install --frozen-lockfile --shamefully-hoist
22+
23+
# Copy source code first (needed before building better-sqlite3 and nuxt)
24+
COPY packages/blog ./packages/blog
25+
26+
# Build better-sqlite3 native module directly
27+
RUN cd /app/node_modules/.pnpm/[email protected]/node_modules/better-sqlite3 && \
28+
npm run build-release
29+
30+
# Build the application
31+
WORKDIR /app/packages/blog
32+
ENV NUXT_CONTENT_DATABASE=false
33+
ENV NITRO_PRESET=node-server
34+
# Remove routeRules prerender for Docker build
35+
RUN sed -i '/routeRules:/,/},/s/^/\/\/ /' nuxt.config.ts
36+
RUN pnpm run build
37+
38+
# Production stage
39+
FROM node:24-slim AS runner
40+
41+
WORKDIR /app
42+
43+
# Copy built application from builder
44+
COPY --from=builder /app/packages/blog/.output /app/.output
45+
46+
# Set environment variables
47+
ENV NODE_ENV=production
48+
ENV HOST=0.0.0.0
49+
ENV PORT=3000
50+
51+
# Expose port
52+
EXPOSE 3000
53+
54+
# Start the application
55+
CMD ["node", ".output/server/index.mjs"]

Dockerfile.simple

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
FROM node:24-slim
2+
WORKDIR /app
3+
COPY package.json ./
4+
RUN echo '{"name": "placeholder", "version": "1.0.0"}' > package.json && \
5+
echo 'const http = require("http"); const server = http.createServer((req, res) => { res.writeHead(200); res.end("Blog placeholder - infrastructure deployed!"); }); server.listen(3000, "0.0.0.0", () => console.log("Server running on port 3000"));' > server.js
6+
EXPOSE 3000
7+
CMD ["node", "server.js"]

0 commit comments

Comments
 (0)