4 Commits

Author SHA1 Message Date
64170db444 Squashed Deploy Configuration Test Env
All checks were successful
Deploy to Production / deploy (push) Successful in 6s
2026-01-07 16:31:27 -06:00
563787c8cb test: deploy
Some checks failed
Deploy to Production / build-and-push (push) Failing after 2m5s
Deploy to Production / deploy (push) Has been skipped
2026-01-04 01:54:41 -06:00
877005ed79 Merge pull request 'feat: Add Dockerfile, Nginx configuration, and GitHub Actions workflow for continuous deployment.' (#1) from test-deploy into main
Some checks failed
Deploy to Production / build-and-push (push) Has been cancelled
Deploy to Production / deploy (push) Has been cancelled
Reviewed-on: #1
2026-01-03 23:06:05 +00:00
9cbb405ba0 feat: Add Dockerfile, Nginx configuration, and GitHub Actions workflow for continuous deployment. 2026-01-03 17:04:43 -06:00
4 changed files with 54 additions and 1 deletions

19
.github/workflows/deploy.yml vendored Normal file
View File

@@ -0,0 +1,19 @@
name: Deploy to Production
on:
push:
branches: [ "main" ]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Deploy Application
uses: appleboy/ssh-action@v1.0.3
with:
host: ${{ secrets.REMOTE_HOST }}
username: ${{ secrets.REMOTE_USER }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
passphrase: ${{ secrets.SSH_PASSPHRASE }}
script: |
powershell -ExecutionPolicy Bypass -Command "Write-Host '=== Starting deployment ==='; if (Test-Path 'C:\projects\digital-resume-FE') { Set-Location 'C:\projects\digital-resume-FE'; git pull origin main } else { New-Item -ItemType Directory -Path 'C:\projects' -Force; Set-Location 'C:\projects'; git clone https://gitea.sashabayda.ca/Bayda77/digital-resume-FE.git }; Write-Host '=== Stopping container ==='; docker stop resume-frontend; docker rm resume-frontend; Write-Host '=== Building image ==='; Set-Location 'C:\projects\digital-resume-FE'; docker build -t resume-frontend:latest .; Write-Host '=== Running container ==='; docker run -d --name resume-frontend --restart unless-stopped -p 3001:80 resume-frontend:latest; Write-Host '=== Verifying ==='; docker ps -a --filter name=resume-frontend"

20
Dockerfile Normal file
View File

@@ -0,0 +1,20 @@
# Build stage
FROM node:18-alpine as build
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build
# Production stage
FROM nginx:alpine
COPY --from=build /app/build /usr/share/nginx/html
COPY nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]

14
nginx.conf Normal file
View File

@@ -0,0 +1,14 @@
server {
listen 80;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
try_files $uri $uri/ /index.html;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}

View File

@@ -28,7 +28,7 @@ export default function Contact() {
>
<div className="contact-intro">
<p>
I'd love to hear from you! Feel free to reach out through any of these channels:
I would love to hear from you! Feel free to reach out through any of these channels:
</p>
</div>