Add CI/CD pipeline for auto-deploy on commit
Some checks failed
Deploy to Production / deploy (push) Has been cancelled
Some checks failed
Deploy to Production / deploy (push) Has been cancelled
This commit is contained in:
24
.github/workflows/deploy.yml
vendored
Normal file
24
.github/workflows/deploy.yml
vendored
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
name: Deploy to Production
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [master, main]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
deploy:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Deploy to server
|
||||||
|
uses: appleboy/ssh-action@v0.1.0
|
||||||
|
with:
|
||||||
|
host: ${{ secrets.HOST }}
|
||||||
|
username: root
|
||||||
|
key: ${{ secrets.SSH_KEY }}
|
||||||
|
script: |
|
||||||
|
cd /root/manoonoils-store
|
||||||
|
git pull origin master
|
||||||
|
npm run build
|
||||||
|
docker build -t manoonoils-store:latest .
|
||||||
|
docker stop manoonoils-store && docker rm manoonoils-store
|
||||||
|
docker run -d --name manoonoils-store -p 3000:3000 --env-file .env.local manoonoils-store:latest
|
||||||
|
docker network connect coolify manoonoils-store
|
||||||
@@ -38,13 +38,13 @@ export default function Header() {
|
|||||||
</Link>
|
</Link>
|
||||||
|
|
||||||
<nav className="hidden md:flex items-center space-x-8">
|
<nav className="hidden md:flex items-center space-x-8">
|
||||||
<Link href="/en/products" className="text-foreground hover:text-accent-dark transition-colors">
|
<Link href="/products" className="text-foreground hover:text-accent-dark transition-colors">
|
||||||
Products
|
Products
|
||||||
</Link>
|
</Link>
|
||||||
<Link href="/en/about" className="text-foreground hover:text-accent-dark transition-colors">
|
<Link href="/about" className="text-foreground hover:text-accent-dark transition-colors">
|
||||||
About
|
About
|
||||||
</Link>
|
</Link>
|
||||||
<Link href="/en/contact" className="text-foreground hover:text-accent-dark transition-colors">
|
<Link href="/contact" className="text-foreground hover:text-accent-dark transition-colors">
|
||||||
Contact
|
Contact
|
||||||
</Link>
|
</Link>
|
||||||
</nav>
|
</nav>
|
||||||
|
|||||||
Reference in New Issue
Block a user