Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Demo Branch from Main #14

Merged
merged 24 commits into from
Mar 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
5226fb8
ci: Choose environment based on branch name
Lissy93 Mar 17, 2025
c41ee31
ci: Change mirror frequency
Lissy93 Mar 17, 2025
deaa222
fix (Dockerfile): add `postgresql-client` for container
l2D Mar 18, 2025
b6a471b
Merge pull request #11 from l2D/fix/missing-psql-for-container
Lissy93 Mar 18, 2025
3f84f7c
ci: Update deploy.yml
Lissy93 Mar 18, 2025
b045fce
fix: deploy.yml
Lissy93 Mar 18, 2025
9058ad5
fix: Update Angular Analog, ignore mermaid in server
Lissy93 Mar 19, 2025
778ba34
feat: Disable nitro sourcemaps
Lissy93 Mar 19, 2025
616163c
fix: Delete all docs πŸ’€
Lissy93 Mar 19, 2025
b61a740
revert: Adds content back in
Lissy93 Mar 21, 2025
5416ec9
fix: Remove mermaid
Lissy93 Mar 21, 2025
07b309d
fix: Dropwodn field filtering
Lissy93 Mar 23, 2025
160454c
fix: Reload domains after adding new domain
Lissy93 Mar 23, 2025
5a77e99
fix: Get update cound of speicific domain if specified
Lissy93 Mar 23, 2025
8650aab
fix: In-app scroll position
Lissy93 Mar 23, 2025
4f0aa45
perf: Manual chunking to reduce memory overhead during compile
Lissy93 Mar 23, 2025
80411d2
ref: Netlify build mem
Lissy93 Mar 23, 2025
7b8cc13
ref: Print env info on build
Lissy93 Mar 23, 2025
bba9081
fix: Render mermaid diagrams client-side in docs
Lissy93 Mar 23, 2025
e68ad7a
ref: Log errors
Lissy93 Mar 23, 2025
7769ac7
fix: Better error catching in docs viewer componenty
Lissy93 Mar 23, 2025
b32b45c
bump: Version 0.0.5
Lissy93 Mar 23, 2025
93b0f70
Merge pull request #12 from Lissy93/fix/vercel2
Lissy93 Mar 23, 2025
b4e4519
Merge remote-tracking branch 'origin/main' into demo
liss-bot Mar 23, 2025
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
40 changes: 30 additions & 10 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,38 @@
name: πŸš€ Deploy to Vercel

on:
push:
branches:
- main
- demo
- '**'
workflow_dispatch:
inputs:
branch:
description: "Which branch do you want to deploy from?"
required: false
default: ""

jobs:
build-and-deploy:
runs-on: ubuntu-latest

steps:
- name: Determine branch
id: determine_branch
run: |
# If this workflow is triggered manually AND a branch input is provided,
# use that. Otherwise, fall back to the automatically provided ref_name.
if [ "${{ github.event_name }}" = "workflow_dispatch" ] && [ "${{ inputs.branch }}" != "" ]; then
echo "branchName=${{ inputs.branch }}" >> $GITHUB_OUTPUT
else
echo "branchName=${{ github.ref_name }}" >> $GITHUB_OUTPUT
fi

- name: Check out code
uses: actions/checkout@v3
with:
# Check out the branch from the previous step.
ref: ${{ steps.determine_branch.outputs.branchName }}

- name: Use Node.js
uses: actions/setup-node@v3
Expand All @@ -26,22 +44,24 @@ jobs:

# Build step for demo branch
- name: Build for Vercel (demo)
if: ${{ github.ref_name == 'demo' }}
if: ${{ steps.determine_branch.outputs.branchName == 'demo' }}
env:
SUPABASE_ANON_KEY: ${{ secrets.DEPLOY_DEMO_SUPABASE_ANON_KEY }}
SUPABASE_URL: ${{ secrets.DEPLOY_DEMO_SUPABASE_URL }}
DL_SUPABASE_PROJECT: ${{ secrets.DEPLOY_DEMO_DL_SUPABASE_PROJECT }}
DL_DNSDUMP_URL: ${{ secrets.DEPLOY_PROD_DL_DNSDUMP_URL }}
DL_PREFERRED_SUBDOMAIN_PROVIDER: ${{ secrets.DEPLOY_PROD_DL_PREFERRED_SUBDOMAIN_PROVIDER }}
DL_SHODAN_URL: ${{ secrets.DEPLOY_PROD_DL_SHODAN_URL }}
DL_DEMO_USER: ${{ secrets.DEPLOY_DEMO_DL_DEMO_USER }}
DL_DEMO_PASS: ${{ secrets.DEPLOY_DEMO_DL_DEMO_PASS }}
NITRO_PRESET: 'vercel'
DL_ENV_TYPE: 'demo'
run: |
NODE_OPTIONS=--max-old-space-size=8192 npm run build:vercel

# Build step for all other branches (prod/feature)
# Build step for main or other branches
- name: Build for Vercel (prod/feature)
if: ${{ github.ref_name != 'demo' }}
if: ${{ steps.determine_branch.outputs.branchName != 'demo' }}
env:
DL_STRIPE_CANCEL_URL: ${{ secrets.DEPLOY_PROD_DL_STRIPE_CANCEL_URL }}
DL_STRIPE_CHECKOUT_URL: ${{ secrets.DEPLOY_PROD_DL_STRIPE_CHECKOUT_URL }}
Expand All @@ -60,18 +80,18 @@ jobs:
if: ${{ success() }}
run: |
npm install -g vercel
if [ "${{ github.ref_name }}" = "main" ]; then
BRANCH="${{ steps.determine_branch.outputs.branchName }}"
if [ "$BRANCH" = "main" ]; then
echo "Deploying to production"
vercel deploy --prebuilt --prod --confirm --token $VERCEL_TOKEN
elif [ "${{ github.ref_name }}" = "demo" ]; then
npx vercel deploy --prebuilt --prod --yes --token $VERCEL_TOKEN
elif [ "$BRANCH" = "demo" ]; then
echo "Deploying to demo"
vercel deploy --prebuilt --confirm --env NEXT_PUBLIC_SITE=demo --token $VERCEL_TOKEN
npx vercel deploy --prebuilt --yes --target=demo --token $VERCEL_TOKEN
else
echo "Deploying to feature environment"
vercel deploy --prebuilt --confirm --env NEXT_PUBLIC_SITE=feature --token $VERCEL_TOKEN
npx vercel deploy --prebuilt --yes --target=staging --token $VERCEL_TOKEN
fi
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}

1 change: 0 additions & 1 deletion .github/workflows/mirror.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ on:
schedule:
- cron: '30 0 * * 0'
push:
branches: [ 'main' ]
tags: [ 'v*' ]
jobs:
codeberg:
Expand Down
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ RUN npm run build
# ──────────────────────────────────────────────────────────────
FROM node:20-alpine AS runner

# Install PostgreSQL client
RUN apk add --no-cache postgresql-client

# Set working directory
WORKDIR /app

Expand Down
Loading