fe: add document type fields to schema and add inputs to NewAdopter… #22
Workflow file for this run
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: Backend deployment | |
on: | |
push: | |
branches-ignore: | |
- '*' | |
tags: | |
- deploy_test* | |
- deploy_prod* | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
- name: Build Backend | |
run: | | |
cd backend | |
pip install flit | |
flit install | |
flit build | |
- name: Start ssh-agent | |
uses: webfactory/ssh-agent@v0.9.0 | |
with: | |
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} # Use the correct secret here | |
- name: Upload tar.gz to remote server | |
run: | | |
scp -o StrictHostKeyChecking=no backend/dist/*.tar.gz ${{secrets.REMOTE_USER}}@${{secrets.REMOTE_HOST}}:/opt/hermadata | |
env: | |
REMOTE_USER: ${{ secrets.REMOTE_USER }} | |
REMOTE_HOST: ${{ secrets.REMOTE_HOST }} | |
- name: Install new version on remote server and restart | |
run: | | |
ssh -o StrictHostKeyChecking=no ${{secrets.REMOTE_USER}}@${{secrets.REMOTE_HOST}} << 'EOF' | |
cd /opt/hermadata | |
source .venv/bin/activate | |
pip install *.tar.gz --force-reinstall | |
rm *.tar.gz | |
export NVM_DIR=~/.nvm | |
pm2 restart hermadata-backend | |
EOF | |
env: | |
REMOTE_USER: ${{ secrets.REMOTE_USER }} | |
REMOTE_HOST: ${{ secrets.REMOTE_HOST }} |