Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
f644b7d
fea: add mise + env
marco-souza Apr 17, 2026
8013ff6
fea: add cloudflare support
marco-souza Apr 18, 2026
23b0152
fea: add cloudflare
marco-souza Apr 18, 2026
b27a7e8
fix: make test pass again
marco-souza Apr 18, 2026
bc01799
Merge remote-tracking branch 'origin/ref/astro' into fea/set-up-iac
Copilot Apr 19, 2026
bdc423e
fix: restore module type after merge conflict resolution
Copilot Apr 19, 2026
8caf370
fix: switch indentation to spaces globally (biome + editorconfig + fi…
Copilot Apr 19, 2026
963527e
fix: convert all files to 2-space indentation and update biome + edit…
Copilot Apr 19, 2026
0849edc
fix: use preview server for E2E and rename comment-pr.js to .cjs
Copilot Apr 19, 2026
af8fe15
fix: remove type:module from package.json, revert comment-pr back to .js
Copilot Apr 19, 2026
fdd2244
fix: add prerender=true to blog slug page for SSR compatibility
Copilot Apr 19, 2026
ed2a48d
fea: initialize infra setup
marco-souza Apr 20, 2026
f898985
ref: remove theme-cookie
marco-souza Apr 20, 2026
a4ef62f
fea: set up initial IaC
marco-souza Apr 20, 2026
cf619f3
enh: pass BASE_URL as astro site domain
marco-souza Apr 20, 2026
9e49266
fea: set up deploy pipeline
marco-souza Apr 20, 2026
a7b423c
fix: codigo lixo da AI desgraçaaaaa
marco-souza Apr 20, 2026
01b55ae
fix: formatando codigo de filha da puta da AI
marco-souza Apr 20, 2026
0c8993a
fix: remove unit tests
marco-souza Apr 20, 2026
c4d16b2
fea: use bun workspace
marco-souza Apr 20, 2026
2420619
enh: improve logo styles
marco-souza Apr 20, 2026
05f1495
fea: deploy dev environment
marco-souza Apr 20, 2026
a3c34e5
fea: create a secondary production domain
marco-souza Apr 20, 2026
f849846
fix: pulumi packages
marco-souza Apr 20, 2026
0ee7a60
fix: lefthook format
marco-souza Apr 20, 2026
2f271dc
fea: set up pulumy deploy pipeline
marco-souza Apr 20, 2026
56de681
enh: update gh action versions
marco-souza Apr 20, 2026
b4b72ee
fix: update pipelines
marco-souza Apr 20, 2026
6ac0e09
fix: BASE_URL in ci
marco-souza Apr 20, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .cursor/.gitignore

This file was deleted.

8 changes: 3 additions & 5 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@ root = true
[*]
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 2

# Set default charset
[*.{tsx,ts,jsx,js}]
[*.{tsx,ts,jsx,js,astro,mdx,json,jsonc}]
charset = utf-8
#
# Set tab width
indent_style = space
indent_size = 2
Binary file added .env.gpg
Binary file not shown.
70 changes: 54 additions & 16 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,70 @@
name: Deploy

# Runs after Quality gateway succeeds on main (merge or direct push).
on:
workflow_run:
workflows: [Quality gateway]
types:
- completed
push:
branches:
- main

concurrency:
group: deploy-mock-${{ github.event.workflow_run.head_branch }}
group: deploy-${{ github.ref }}
cancel-in-progress: true

jobs:
detect-deploy:
runs-on: ubuntu-latest
outputs:
stack: ${{ steps.detect.outputs.stack }}
steps:
- id: detect
run: |
if [[ "${{ github.ref_type }}" == "tag" && "${{ github.ref_name }}" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "stack=production" >> $GITHUB_OUTPUT
else
echo "stack=dev" >> $GITHUB_OUTPUT
fi

deploy:
if: >-
github.event.workflow_run.conclusion == 'success' &&
github.event.workflow_run.head_branch == 'main' &&
github.event.workflow_run.event == 'push'
needs: detect-deploy
runs-on: ubuntu-latest
timeout-minutes: 5
timeout-minutes: 20
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
ref: ${{ github.event.workflow_run.head_sha }}
ref: ${{ github.sha }}

- name: Mock production deploy
- uses: actions/setup-node@v6
with:
node-version-file: ".node-version"

- uses: oven-sh/setup-bun@v2
with:
bun-version: latest

- name: Install dependencies
run: bun install --frozen-lockfile

- name: Build
run: bun run w:build

- name: Configure Pulumi
uses: pulumi/actions@v6
with:
workDir: infra
stack-name: podcodar.${{ needs.detect-deploy.outputs.stack }}
env:
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}

- name: Pulumi up
run: |
echo "Mock deploy: main updated (sha=${GITHUB_SHA})"
echo "Replace this step with real deploy (hosting, container registry, etc.)."
cd infra && bun run up --yes
env:
# Cloudflare
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}

# Pulumi
PULUMI_CONFIG_PASSPHRASE: ${{ secrets.PULUMI_PASSPHRASE }}
PULUMI_BACKEND_URL: "s3://podcodar-pulumi-state?endpoint=${{ secrets.CLOUDFLARE_ACCOUNT_ID }}.r2.cloudflarestorage.com"
14 changes: 8 additions & 6 deletions .github/workflows/playwright-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ jobs:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write # needed for the PR comment step
pull-requests: write # needed for the PR comment step

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

# Astro requires Node >=22.12.0 (see .node-version / package.json engines)
- uses: actions/setup-node@v4
- uses: actions/setup-node@v6
with:
node-version-file: ".node-version"

Expand All @@ -39,6 +39,8 @@ jobs:
# Build the Astro site and start the preview server on port 4321
- name: Build Astro site
run: bun run build
env:
BASE_URL: "http://localhost:4321"

- name: Run Playwright E2E tests
run: bunx playwright test
Expand All @@ -49,15 +51,15 @@ jobs:
# Always upload artifacts so failures can be investigated
- name: Upload Playwright report
if: always()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: playwright-report
path: playwright-report/
retention-days: 14

- name: Upload test results (traces, videos, screenshots)
if: always()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: playwright-results
path: test-results/
Expand All @@ -68,7 +70,7 @@ jobs:
# (GITHUB_TOKEN is scoped to the target repo).
- name: Comment on PR
if: always() && github.event_name == 'pull_request'
uses: actions/github-script@v7
uses: actions/github-script@v9
env:
JOB_STATUS: ${{ job.status }}
with:
Expand Down
13 changes: 8 additions & 5 deletions .github/workflows/quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

# Astro requires Node >=22.12.0 (see package.json engines); runners default to Node 20.
- uses: actions/setup-node@v4
- uses: actions/setup-node@v6
with:
node-version-file: '.node-version'
node-version-file: ".node-version"

- uses: oven-sh/setup-bun@v2
with:
Expand All @@ -40,8 +40,11 @@ jobs:
- name: Astro check
run: bunx astro check

- name: Unit tests (Vitest)
run: bun run test
# INFO: disabled for now
# - name: Unit tests (Vitest)
# run: bun run test

- name: Build
run: bun run build
env:
BASE_URL: "http://localhost:4321"
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ pnpm-debug.log*
# Maestro Setup
.maestro/

# Cloudflare
.wrangler/
# E2E Tests - Playwright
test-results/
playwright-report/
4 changes: 2 additions & 2 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"recommendations": ["astro-build.astro-vscode", "unifiedjs.vscode-mdx"],
"unwantedRecommendations": []
"recommendations": ["astro-build.astro-vscode", "unifiedjs.vscode-mdx"],
"unwantedRecommendations": []
}
18 changes: 9 additions & 9 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"version": "0.2.0",
"configurations": [
{
"command": "./node_modules/.bin/astro dev",
"name": "Development server",
"request": "launch",
"type": "node-terminal"
}
]
"version": "0.2.0",
"configurations": [
{
"command": "./node_modules/.bin/astro dev",
"name": "Development server",
"request": "launch",
"type": "node-terminal"
}
]
}
18 changes: 9 additions & 9 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,22 +29,22 @@ Static assets such as images can go in `public/` or be imported from `src/assets

This matches the open-source app at [podcodar/webapp](https://github.com/podcodar/webapp): **Tailwind CSS v4** via [`@tailwindcss/vite`](https://tailwindcss.com/docs/installation/framework-guides/astro) and **daisyUI** (`@import "tailwindcss";` + `@plugin "daisyui";` in [`src/styles/global.css`](src/styles/global.css)).

Semantic colors (`primary`, `secondary`, `accent`, `base-*`, etc.) come from daisyUI’s default light/dark themes—the same OKLCH tokens as [podcodar.org](https://podcodar.org). The document theme follows system preference (`prefers-color-scheme`) or the `podcodar-theme` cookie (`light` / `dark`), applied from an inline script in [`BaseHead.astro`](src/components/BaseHead.astro). Use [`src/lib/theme-cookie.ts`](src/lib/theme-cookie.ts) to read or update that cookie from client code.
Semantic colors (`primary`, `secondary`, `accent`, `base-*`, etc.) come from daisyUI’s default light/dark themes—the same OKLCH tokens as [podcodar.org](https://podcodar.org). The document theme follows system preference (`prefers-color-scheme`).

For a quick visual check, open [`/design-system`](src/pages/design-system.astro) after `bun dev`.

## Commands

Run these from the repository root:

| Command | Action |
| :------ | :----- |
| `bun install` | Install dependencies |
| `bun dev` | Start dev server at `localhost:4321` |
| `bun run build` | Production build to `./dist/` |
| `bun run preview` | Preview the production build locally |
| `bun astro ...` | Astro CLI (`astro add`, `astro check`, etc.) |
| `bun astro -- --help` | Astro CLI help |
| Command | Action |
| :-------------------- | :------------------------------------------- |
| `bun install` | Install dependencies |
| `bun dev` | Start dev server at `localhost:4321` |
| `bun run build` | Production build to `./dist/` |
| `bun run preview` | Preview the production build locally |
| `bun astro ...` | Astro CLI (`astro add`, `astro check`, etc.) |
| `bun astro -- --help` | Astro CLI help |

## Learn more

Expand Down
63 changes: 0 additions & 63 deletions astro.config.mjs

This file was deleted.

60 changes: 60 additions & 0 deletions astro.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
// https://astro.build/config
import cloudflare from '@astrojs/cloudflare';
import mdx from '@astrojs/mdx';
import sitemap from '@astrojs/sitemap';
import tailwindcss from '@tailwindcss/vite';
import { defineConfig, fontProviders } from 'astro/config';
import icon from 'astro-icon';
import tsconfigPaths from 'vite-tsconfig-paths';

export default defineConfig({
site: process.env.BASE_URL,
adapter: cloudflare({ prerenderEnvironment: 'node' }),

i18n: {
locales: ['pt-br'],
defaultLocale: 'pt-br',
routing: {
prefixDefaultLocale: false,
},
},

integrations: [
mdx(),
sitemap(),
icon({
include: {
'simple-icons': ['github', 'linkedin', 'instagram', 'youtube', 'x', 'discord'],
},
}),
],

fonts: [
{
provider: fontProviders.local(),
name: 'Atkinson',
cssVariable: '--font-atkinson',
fallbacks: ['sans-serif'],
options: {
variants: [
{
src: ['./src/assets/fonts/atkinson-regular.woff'],
weight: 400,
style: 'normal',
display: 'swap',
},
{
src: ['./src/assets/fonts/atkinson-bold.woff'],
weight: 700,
style: 'normal',
display: 'swap',
},
],
},
},
],

vite: {
plugins: [tailwindcss(), tsconfigPaths()],
},
});
Loading
Loading