Bump typescript from 5.3.2 to 5.3.3 in /frontend (#116) #270
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |