Skip to content
Draft
1 change: 1 addition & 0 deletions .deploy/known_hosts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
129.199.194.59 ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC/gPgEHsPShnmSxdcbYxc2TyfHj/bz8/sOj0u5N5zUS2VMevC59e8hfRpyNWVsJzV64u5brdSEX297lm78Zi3Ui6ZHkzjwoUYewqy9cNqNFEn6JGMPbE4TuJiA8OCMYuuv9jVu7H4vNqmKBSFclzJC/PwnAMDr57eg4sDtUTOCWcAD/tvnYRGCZ95C80oBwtSOZ7hi+odRsfYkf67XHh2UmzqabdNAtp5Itg/7ZcCKtUJIlvQN7JJqnCX8YpgZoIgouONWWC9InsfQJW8dB/5LndLm4srwucGLDh7oWG+na8TDheACovyBF3VgZMXliixJSUFEDkllZ66DA7Ecn4bufHHztS1eekq/le9nCDXdgyoeDxZY13AHsiH1tQomRQvLxjMvE6SayQtWOSDLBuOMVLuplfKQ6EJ3pSjVaJzZzdY/BjvljhaH+MDjeTRz7p5EfPGEQyl/9aNJwbNi8iTKIcXtj84NV7eH9SQsB1pLAuyfkkkbgFeceN7MQKF0eEs=
46 changes: 46 additions & 0 deletions .github/workflows/cicd_dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Copy website to the development site

on:
push:
branches:
- cicd_dev

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
copy:
runs-on: ubuntu-latest

steps:
- name: Check out repository code
uses: actions/checkout@v3

- name: Install and start the ssh agent
run: |
which ssh-agent || ( apt-get install -qq openssh-client )
eval $(ssh-agent -s)

- name: Read the ssh private key
env:
SSH_SECRET_KEY: ${{ secrets.SSH_SECRET_KEY }}
run: |
eval $(ssh-agent -s)
ssh-add <(echo "$SSH_SECRET_KEY" | base64 --decode)

- name: Definition of the known host
run: |
mkdir -p ~/.ssh/
# ssh-keyscan 129.199.194.59 > .deploy/known_host
mv .deploy/known_hosts ~/.ssh/
chmod 644 ~/.ssh/known_hosts

- name: Check the IP of the machine
run: |
ip addr

- name: Synchronization of the remote deployment
run: |
ssh d4gtaxobs@129.199.194.59 "sudo service taxplorer-dev.uwsgi stop"
#ssh d4gtaxobs@129.199.194.59 "cd /opt/d4g/12_taxobservatory_dataviz_dev && git pull"
ssh d4gtaxobs@129.199.194.59 "sudo service taxplorer-dev.uwsgi start"