generated from athackst/vscode_ros2_workspace
-
Notifications
You must be signed in to change notification settings - Fork 2
28 lines (26 loc) · 1002 Bytes
/
deployment.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
name: Deployment
on:
# Uncomment once we are ready to deploy
#push:
# branches:
# - main
workflow_dispatch:
jobs:
deploy-web:
runs-on: ubuntu-latest
steps:
- name: Checkout workspace
uses: actions/checkout@v4
- name: Update docker image
uses: appleboy/[email protected]
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USERNAME }}
key: ${{ secrets.SSH_KEY }}
script: |
[ ! -d "sailbot_workspace" ] && git clone https://github.com/UBCSailbot/sailbot_workspace.git
cd sailbot_workspace
git pull
touch src/website/.env.local # Adds a local environment file to VM to override env vars in .env.production
echo NEXT_PUBLIC_SERVER_HOST=http://${{ secrets.SSH_HOST }} >> src/website/.env.local
docker compose -f .devcontainer/docker-compose.yml -f .devcontainer/website/docker-compose.website.prod.yml up --force-recreate -d --build --remove-orphans