Skip to content

Merge pull request #43 from cf15-t5/development #24

Merge pull request #43 from cf15-t5/development

Merge pull request #43 from cf15-t5/development #24

Workflow file for this run

# CI/CD Name
name: 'Deployment'
# Trigger the workflow on pushes to the master branch
on:
push:
branches:
- master
jobs:
build:
# Run on the latest version of Ubuntu
runs-on: ubuntu-latest
steps:
# Check out the repository to access its contents
- name: Checkout Repository
uses: actions/checkout@v2
# Set up Node.js for Installing Dependencies
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '14'
# Install Python dependencies using pip
- name: Install Python Dependencies
run: pip install -r requirement.txt
deploy:
needs: build
# Run on the latest version of Ubuntu
runs-on: ubuntu-latest
steps:
# Deploy the application to the VPS
- name: Deploy to VPS
uses: appleboy/[email protected]
with:
host: ${{ secrets.VPS_HOSTNAME }}
username: ${{ secrets.VPS_USERNAME }}
password: ${{ secrets.VPS_PASSWORD }}
port: ${{ secrets.VPS_PORT }}
script: |
cd seticket-backend/
export FLASK_APP=server.py
git pull
pip install -r requirement.txt
flask db upgrade
pm2 restart seticket-backend