Deploy Test #260
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 Test | |
on: | |
workflow_dispatch: | |
push: | |
paths: | |
- "./" | |
branches: | |
- "dev" | |
jobs: | |
build: | |
name: Deploy | |
runs-on: ubuntu-latest | |
steps: | |
- name: Establish connection and deploy | |
uses: appleboy/ssh-action@master | |
with: | |
host: ${{ secrets.SSH_HOST }} | |
key: ${{ secrets.SSH_KEY }} | |
passphrase: ${{ secrets.SSH_PASSPHRASE }} | |
port: ${{ secrets.SSH_PORT }} | |
username: ${{ secrets.SSH_USERNAME }} | |
script: | | |
cd /webapps/test-servers/one-stop-2021 | |
git checkout dev | |
git pull origin dev | |
git status | |
docker-compose -f docker-compose.test.prod.yaml up -d --build | |
mongo ${{ secrets.ONESTOP_TEST_DB_NAME }} --eval 'db.lastupdates.updateOne({},{$set:{timetable: new Date()}})' |