Update work_form.html #600
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 Dev App" | |
on: | |
push: | |
branches: | |
- development | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@master | |
- name: "Copies development branch to ourchive-dev server" | |
env: | |
remote_host: ${{ secrets.DEPLOY_HOST }} | |
remote_port: ${{ secrets.DEPLOY_PORT }} | |
remote_user: ${{ secrets.DEPLOY_USER }} | |
remote_key: ${{ secrets.DEPLOY_KEY }} | |
dev_env_file: ${{ secrets.DEV_ENV_FILE }} | |
local_dir: "ourchive_app" | |
remote_dir: "/home/ourchive-integration/dev_deploy" | |
run: | | |
mkdir ~/.ssh | |
echo "$remote_key" > ~/.ssh/id_github | |
chmod 600 ~/.ssh/id_github | |
sudo apt-get install python3-pip python3-dev | |
sudo -H pip3 install virtualenv | |
virtualenv venv | |
source venv/bin/activate | |
pip install django | |
pip install -r ourchive_app/requirements.txt | |
python ourchive_app/manage.py collectstatic | |
rsync -avzr -e "ssh -p ${remote_port} -i ~/.ssh/id_github -o StrictHostKeyChecking=no" ${local_dir} ${remote_user}@${remote_host}:${remote_dir} | |
rm ~/.ssh/id_github | |
- name: Execute Python Script | |
uses: appleboy/ssh-action@v0.1.10 | |
env: | |
remote_host: ${{ secrets.DEPLOY_HOST }} | |
remote_port: ${{ secrets.DEPLOY_PORT }} | |
remote_user: ${{ secrets.DEPLOY_USER }} | |
remote_key: ${{ secrets.DEPLOY_KEY }} | |
with: | |
host: ${{ secrets.DEPLOY_HOST }} | |
username: ${{ secrets.DEPLOY_USER }} | |
key: ${{ secrets.DEPLOY_KEY }} | |
port: ${{ secrets.DEPLOY_PORT }} | |
script: cd dev_deploy && bash test.sh |