Skip to content

Commit 4d80d90

Browse files
committed
preview
1 parent 256f1e2 commit 4d80d90

12 files changed

+120
-16
lines changed

.cache/rss-cache.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
"etag": "W/\"6c83011f81bbb055bdee75ae39d61ab2\""
44
},
55
"https://spin.atomicobject.com/author/nathan-papes/feed/atom/": {
6-
"etag": "W/\"42d099d3a398f7701824177ca25797a7\"",
7-
"lastModified": "Sat, 09 Aug 2025 12:00:55 GMT"
6+
"etag": "W/\"f6e37bfe1dc53e5dfaf880c3a4412907\"",
7+
"lastModified": "Wed, 20 Aug 2025 17:38:52 GMT"
88
},
99
"https://www.youtube.com/feeds/videos.xml?channel_id=UCPwv65XQty1QbqE04FitBlQ": {}
1010
}

.github/workflows/preview.yml

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
name: preview
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- dev
7+
types: [opened, synchronize, reopened, closed]
8+
9+
concurrency:
10+
group: preview-${{ github.event.pull_request.number }}
11+
cancel-in-progress: true
12+
13+
jobs:
14+
deploy-preview:
15+
if: github.event.action != 'closed'
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout code
19+
uses: actions/checkout@v4
20+
21+
- name: Setup Bun
22+
uses: oven-sh/setup-bun@v1
23+
with:
24+
bun-version: latest
25+
26+
- name: Install dependencies
27+
run: bun install --frozen-lockfile
28+
29+
- name: Deploy preview
30+
id: deploy
31+
run: |
32+
DEPLOY_OUTPUT=$(bun sst deploy --stage=pr-${{ github.event.pull_request.number }} 2>&1)
33+
echo "$DEPLOY_OUTPUT"
34+
# Look for custom subdomain preview URLs
35+
PREVIEW_URL=$(echo "$DEPLOY_OUTPUT" | grep -oE 'https://[0-9]+\.dev\.natepapes\.com' | head -1)
36+
echo "url=$PREVIEW_URL" >> $GITHUB_OUTPUT
37+
env:
38+
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
39+
40+
- name: Comment PR with preview URL
41+
uses: actions/github-script@v7
42+
with:
43+
script: |
44+
const { data: comments } = await github.rest.issues.listComments({
45+
owner: context.repo.owner,
46+
repo: context.repo.repo,
47+
issue_number: context.issue.number,
48+
});
49+
50+
const botComment = comments.find(comment =>
51+
comment.user.type === 'Bot' && comment.body.includes('🚀 Preview deployed')
52+
);
53+
54+
const body = `🚀 Preview deployed to: ${{ steps.deploy.outputs.url }}
55+
56+
This preview will be automatically deleted when the PR is closed.`;
57+
58+
if (botComment) {
59+
await github.rest.issues.updateComment({
60+
owner: context.repo.owner,
61+
repo: context.repo.repo,
62+
comment_id: botComment.id,
63+
body: body
64+
});
65+
} else {
66+
await github.rest.issues.createComment({
67+
owner: context.repo.owner,
68+
repo: context.repo.repo,
69+
issue_number: context.issue.number,
70+
body: body
71+
});
72+
}
73+
74+
cleanup-preview:
75+
if: github.event.action == 'closed'
76+
runs-on: ubuntu-latest
77+
steps:
78+
- name: Checkout code
79+
uses: actions/checkout@v4
80+
81+
- name: Setup Bun
82+
uses: oven-sh/setup-bun@v1
83+
with:
84+
bun-version: latest
85+
86+
- name: Install dependencies
87+
run: bun install --frozen-lockfile
88+
89+
- name: Remove preview deployment
90+
run: bun sst remove --stage=pr-${{ github.event.pull_request.number }}
91+
env:
92+
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
93+
94+
- name: Comment PR about cleanup
95+
uses: actions/github-script@v7
96+
with:
97+
script: |
98+
await github.rest.issues.createComment({
99+
owner: context.repo.owner,
100+
repo: context.repo.repo,
101+
issue_number: context.issue.number,
102+
body: 'Preview deployment has been cleaned up.'
103+
});

packages/core/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from "./src/index.ts";
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
id = "a-pragmatic-look-at-web-scraping-open-source-and-llm-assiste"
2+
title = "A Pragmatic Look at Web Scraping, Open Source, and LLM-Assisted Development"
3+
description = "My Mrln project serves as an example of a few ethical topics related to creators, AI labs, and LLM-assisted development."
4+
url = "https://spin.atomicobject.com/llm-assisted-development/"
5+
created_at = "2025-08-20T17:38:52Z"
6+
estimated_time_minutes = 5
7+
tags = ["AI for Developers","llms","web scrapping","artificial intelligence"]

providers/atomicobject/content/aurora-mysql-8-upgrade-using-the-aws-blue-green-style.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ description = "Upgrade database with AWS RDS going from Aurora MySQL 5.7 to 8.0
44
url = "https://spin.atomicobject.com/aurora-mysql-8-aws-blue-green/"
55
created_at = "2025-02-12T19:52:56Z"
66
estimated_time_minutes = 7
7-
tags = ["AWS","database","aws","app","database migration"]
7+
tags = ["AWS","aws","database","database migration","app"]

providers/atomicobject/content/create-a-time-tracking-cli-tool-with-go-oauth2-and-google-ca.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ description = "In 2024, there's been a lot of hype around Golang. I felt inspire
44
url = "https://spin.atomicobject.com/golang-time-tracking/"
55
created_at = "2024-04-16T20:59:47Z"
66
estimated_time_minutes = 4
7-
tags = ["Golang","time tracking","oauth2","calendar","golang","google"]
7+
tags = ["Golang","calendar","google","golang","oauth2","time tracking"]

providers/atomicobject/content/docker-compose-dependency-management-isn-8217-t-a-silver-bul.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ description = "The dependency management in Docker Compose, particularly with th
44
url = "https://spin.atomicobject.com/docker-dependency-management/"
55
created_at = "2024-01-25T21:27:16Z"
66
estimated_time_minutes = 3
7-
tags = ["DevOps & System Admin.","python","docker","docker-compose","django","mariadb"]
7+
tags = ["DevOps & System Admin.","python","mariadb","docker-compose","django","docker"]

providers/atomicobject/content/from-green-to-great-building-confidence-in-consulting.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ description = "Preferring simplicity over complexity and being a great communica
44
url = "https://spin.atomicobject.com/software-consultants-confidence/"
55
created_at = "2024-07-17T18:51:31Z"
66
estimated_time_minutes = 4
7-
tags = ["Growing as Makers","problem solving","career development","consulting","atomic accelerator"]
7+
tags = ["Growing as Makers","career development","problem solving","consulting","atomic accelerator"]

providers/atomicobject/content/introducing-sst-v3-for-modern-aws-serverless-infrastructure.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ description = "Web apps often have rich front ends and lean back ends, leading t
44
url = "https://spin.atomicobject.com/sst-v3-for-aws-serverless/"
55
created_at = "2025-06-23T20:04:33Z"
66
estimated_time_minutes = 9
7-
tags = ["AWS","aws","SST v3","IaC","serverless"]
7+
tags = ["AWS","IaC","serverless","SST v3","aws"]

providers/atomicobject/content/optimize-ef-core-database-query-performance.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ description = "In a recent software project, we saw a big drop in the web app's
44
url = "https://spin.atomicobject.com/ef-core-query-performance/"
55
created_at = "2024-10-28T21:18:21Z"
66
estimated_time_minutes = 3
7-
tags = ["C#","dotnet","csharp","ef core","AsSplitQuery","projections"]
7+
tags = ["C#","projections","AsSplitQuery","ef core","dotnet","csharp"]

0 commit comments

Comments
 (0)