Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
46 changes: 46 additions & 0 deletions .github/workflows/dev.docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Publish API Image (Dev)

on:
push:
branches:
- dev

permissions:
contents: read
packages: write

jobs:
docker-build-push-dev:
runs-on: ubuntu-latest

steps:
- name: Checkout source code
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract Docker metadata (Dev)
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository_owner }}/pressiqo-land
tags: |
dev

- name: Build and push Docker image (Dev)
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: true
platforms: linux/amd64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
File renamed without changes.
File renamed without changes.
48 changes: 48 additions & 0 deletions .github/workflows/main.docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Publish API Image

on:
push:
branches:
- main
tags:
- "v*.*.*"

permissions:
contents: read
packages: write

jobs:
docker-build-push:
runs-on: ubuntu-latest

steps:
- name: Checkout source code
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository_owner }}/pressiqo-land
tags: |
latest

- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: true
platforms: linux/amd64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
69 changes: 52 additions & 17 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,68 @@
name: Build Only
name: Release API

on:
push:
branches:
- build
- main

permissions:
contents: write

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

defaults:
run:
shell: bash
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v3
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
cache: npm

- name: Install dependencies
run: npm ci --legacy-peer-deps
working-directory: ./app
run: |
if [ -f package-lock.json ]; then
npm ci
else
npm install
fi

- name: Build production bundle
run: npm run build --if-present

- name: Build
run: npm run build
working-directory: ./app
- name: Compute release tag
id: version
run: echo "tag=v$(date +'%Y.%m.%d')-${GITHUB_RUN_NUMBER}" >> "$GITHUB_OUTPUT"

- name: Prepare release archive
run: |
mkdir -p release
cp -r dist release/
cp package.json release/
[ -f package-lock.json ] && cp package-lock.json release/
cp tsconfig.json release/ || true
tar -czf pressiqo-land-${{ steps.version.outputs.tag }}.tar.gz -C release .

- name: Upload build artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: pressiqo-land-${{ steps.version.outputs.tag }}
path: pressiqo-land-${{ steps.version.outputs.tag }}.tar.gz
retention-days: 14

- name: Publish GitHub release
uses: softprops/action-gh-release@v2
with:
name: app-dist
path: ./app/dist
tag_name: ${{ steps.version.outputs.tag }}
name: pressiqo.app ${{ steps.version.outputs.tag }}
body: |
Automated release for pressiqo.app
- Commit: ${{ github.sha }}
- Build: ${{ github.run_id }}
files: |
pressiqo-land-${{ steps.version.outputs.tag }}.tar.gz
2 changes: 1 addition & 1 deletion App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const App: React.FC = () => {
<Gallery />
<Pricing />
<FAQ />
<Testimonials />
{/* <Testimonials /> */}
</main>
<Footer />
<StickyCTA />
Expand Down
37 changes: 37 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# ============================
# Stage 1: Build (Vite)
# ============================
FROM node:20-alpine AS builder

WORKDIR /app

# Install dependencies first (cache-efficient)
COPY package.json package-lock.json ./
RUN npm ci --legacy-peer-deps

# Copy application source
COPY . .

# Build static assets
RUN npm run build


# ============================
# Stage 2: Runtime (Nginx)
# ============================
FROM nginx:alpine

# Remove default Nginx config
RUN rm /etc/nginx/conf.d/default.conf

# Copy SPA-safe Nginx config
COPY nginx.conf /etc/nginx/conf.d/default.conf

# Copy only the built assets
COPY --from=builder /app/dist /usr/share/nginx/html

# Standard HTTP port (internal only)
EXPOSE 80

# Run Nginx in foreground
CMD ["nginx", "-g", "daemon off;"]
19 changes: 19 additions & 0 deletions nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
server {
listen 80;
server_name _;

root /usr/share/nginx/html;
index index.html;

location / {
try_files $uri $uri/ /index.html;
}

# Optional but recommended
gzip on;
gzip_types
text/css
application/javascript
application/json
image/svg+xml;
}
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "www.pressiqo.app",
"name": "www.pressqo.com",
"private": true,
"version": "0.0.0",
"type": "module",
Expand All @@ -21,4 +21,4 @@
"typescript": "~5.8.2",
"vite": "^6.2.0"
}
}
}