Initial commit #2
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: I18N CD | |
on: | |
push: | |
branches: [master] | |
jobs: | |
run-test: | |
services: | |
postgres: | |
image: postgres:14.8 | |
env: | |
POSTGRES_DB: infonex | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: 1 | |
ports: | |
- 5432:5432 | |
runs-on: ubuntu-latest | |
env: | |
DJANGO_SETTINGS_MODULE: root.settings | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: 3.10.5 | |
- name: requirements | |
run: pip install -r requirements.txt | |
deploy: | |
runs-on: ubuntu-latest | |
needs: run-test | |
steps: | |
- name: Deploy to digitalocean | |
uses: appleboy/ssh-action@v1.0.0 | |
with: | |
host: 207.154.212.9 | |
username: root | |
key: ${{ secrets.KEY }} | |
script: | | |
cd i18n/ | |
git pull | |
pip install -r requirements.txt | |
sudo systemctl restart gunicorn.socket gunicorn.service |