Merge pull request #27 from LL08-MathematicalModelling-dowell/DOCKERI… #28
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: DataCube CI/CD deployment workflow | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Install sshpass | |
run: sudo apt-get install -y sshpass | |
- name: Deploy to Server | |
env: | |
SSH_PASSWORD: ${{ secrets.SSH_PASSWORD }} | |
run: | | |
sshpass -p $SSH_PASSWORD ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} << 'EOF' | |
cd ${{ secrets.WORKING_DIR }} | |
git pull origin main | |
# docker-compose up -d --build | |
echo "Deployment successful" | |
EOF |