mirror of
https://github.com/neosubhamoy/neosubhamoy-portfolio.git
synced 2025-12-20 02:19:34 +05:30
36 lines
1.1 KiB
YAML
36 lines
1.1 KiB
YAML
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
name: 🚀 Deploy website on server
|
|
jobs:
|
|
web-deploy:
|
|
name: 🎉 Deploy
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: 🚚 Get latest code
|
|
uses: actions/checkout@v3
|
|
|
|
- name: 📦 Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
|
|
- name: 🛠️ Run Build Process
|
|
run: |
|
|
npm install
|
|
npx tailwindcss -o "./htdocs/assets/style.css" --minify
|
|
|
|
- name: 📦 Update Database
|
|
run: |
|
|
mysql -h ${{ secrets.DB_HOST }} --port 3306 -u${{ secrets.DB_USERNAME }} -p${{ secrets.DB_PASSWORD }} -D${{ secrets.DB_NAME }} -e "source drop_script.sql"
|
|
mysql -h ${{ secrets.DB_HOST }} --port 3306 -u${{ secrets.DB_USERNAME }} -p${{ secrets.DB_PASSWORD }} -D${{ secrets.DB_NAME }} -e "source neosubhamoy.sql"
|
|
|
|
- name: 📂 Sync files
|
|
uses: SamKirkland/FTP-Deploy-Action@v4.3.4
|
|
with:
|
|
server: ${{ secrets.FTP_SERVER }}
|
|
username: ${{ secrets.FTP_USERNAME }}
|
|
password: ${{ secrets.FTP_PASSWORD }}
|
|
local-dir: ./htdocs/ |