forked from BLC/AyposWeb
Compare commits
22 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b29326bd99 | |||
| 8c7ad1e84c | |||
| 28122a0270 | |||
| c14545abff | |||
| 250b5e820d | |||
| d1647a155f | |||
| 4ac78b1f4e | |||
| a2efe24fcc | |||
| 05669f8e9e | |||
| b01b5ddcbb | |||
| 2041b76710 | |||
| fd467e5dcf | |||
| 961f6ba1f4 | |||
| 7df0cea326 | |||
| 05a39d1e25 | |||
| 58028d1baa | |||
| b19080cf3d | |||
| 1e1d6bcdee | |||
| aa4b2b3150 | |||
| 8775b9515e | |||
| 4ea8a24b9e | |||
| 2c78e634d0 |
26
.gitea/workflows/Aypos.yml
Normal file
26
.gitea/workflows/Aypos.yml
Normal file
@@ -0,0 +1,26 @@
|
||||
name: sgeUpdated CI/CD
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Setup SSH
|
||||
run: |
|
||||
mkdir -p ~/.ssh/
|
||||
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
|
||||
chmod 600 ~/.ssh/id_rsa
|
||||
ssh-keyscan ${{ secrets.SERVER_HOST }} >> ~/.ssh/known_hosts
|
||||
|
||||
- name: Run deploy script on server
|
||||
run: |
|
||||
ssh ${{ secrets.SERVER_USER }}@${{ secrets.SERVER_HOST }} << 'EOF'
|
||||
echo "✅ Connected to server. Running deploy script..."
|
||||
cd /home/ubuntu/Bgreen/sgeUpdated
|
||||
./deploy.sh
|
||||
EOF
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -36,3 +36,4 @@ yarn-error.log*
|
||||
# TypeScript
|
||||
*.tsbuildinfo
|
||||
node_modules
|
||||
deploy.sh
|
||||
|
||||
24
deploy.sh
24
deploy.sh
@@ -1,24 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
APP_DIR="/home/ubuntu/AyposWeb"
|
||||
|
||||
# Navigate to your app directory
|
||||
cd "$APP_DIR" || { echo "Failed to cd to $APP_DIR"; exit 1; }
|
||||
|
||||
# Pull latest changes from Gitea
|
||||
echo "Pulling latest code..."
|
||||
git pull origin main || { echo "Git pull failed"; exit 1; }
|
||||
|
||||
# Build your app (change this to your build command)
|
||||
# For example, npm build:
|
||||
echo "Installing dependencies..."
|
||||
npm install || { echo "npm install failed"; exit 1; }
|
||||
|
||||
echo "Building app..."
|
||||
npm run build || { echo "npm build failed"; exit 1; }
|
||||
|
||||
# Restart your app (change this to your app's restart command)
|
||||
# For example, systemctl restart myapp.service:
|
||||
systemctl reload nginx || { echo "Failed to reload nginx"; exit 1; }
|
||||
|
||||
echo "Deployment complete"
|
||||
Reference in New Issue
Block a user