Skip to content

Bump certifi from 2023.7.22 to 2023.11.17 in /backend (#98) #252

Bump certifi from 2023.7.22 to 2023.11.17 in /backend (#98)

Bump certifi from 2023.7.22 to 2023.11.17 in /backend (#98) #252

Workflow file for this run

name: Deploy
on:
push:
branches: [ "main" ]
jobs:
build:
runs-on: self-hosted
strategy:
max-parallel: 4
matrix:
python-version: [3.9]
node-version: [19.x]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install frontend dependencies
run: npm install
working-directory: ./frontend
- name: Build
run: npm run build
working-directory: ./frontend
- name: Copy files to /var/www
run: cp -r ~/git/productive/_work/ProductiveMaster/ProductiveMaster/frontend/build /var/www/productive.maksymiliangala.com/
- name: Cleanup
run: rm -rf frontend/
- name: Create virtual environment
working-directory: 'backend'
run: |
python3 -m venv venv
- name: Install Dependencies
working-directory: 'backend'
run: |
python3 -m pip install --upgrade pip
source venv/bin/activate
pip install -r requirements.txt
- name: Create .env
working-directory: 'backend'
run: echo "${{ secrets.ENV_PRODUCTION }}" > .env
- name: Apply migrations
working-directory: 'backend'
run: |
source venv/bin/activate
python3 manage.py migrate
- name: Restart app
working-directory: 'backend'
run: sudo systemctl restart productivemaster.service