Skip to content

add calliar as images #43

add calliar as images

add calliar as images #43

name: Deployment Workflow
on:
push:
branches: [main]
jobs:
first_job:
name: Deploy Calliar Website
runs-on: ubuntu-latest
steps:
- name: SSH Remote Commands
uses: appleboy/ssh-action@v0.1.4
with:
host: calliar.arbml.org
username: arabicmachinelearning
key: ${{ secrets.SECRET_SSHKEY }}
port: 22
script: |
cd ~
if [ ! -d "atmatah" ];
then
echo cloning atamatah as it does not exist
git clone https://github.com/ARBML/atmatah.git
cd atmatah
else
echo pulling latest changes from atmatah
cd atmatah
git pull
fi
echo creating venv if not exist and install requirements
if [ ! -d "venv" ];
then
python3 -m venv venv
fi
venv/bin/python3 -m pip install -r requirements.txt
venv/bin/ansible-galaxy install -r requirements.yml
echo prepare for deploy
mkdir -p .config
echo ${{ secrets.ANS_PASS }} > .config/ansible_pass.password
echo deploy calliar app
venv/bin/ansible-playbook -i apps/calliar/inventory apps/calliar/app.yml --vault-password-file=.config/ansible_pass.password --connection=local
echo cleanup
cd ~