-
Notifications
You must be signed in to change notification settings - Fork 34
55 lines (47 loc) · 1.63 KB
/
deploy.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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# name: Deploy to Staging
# on:
# push:
# branches:
# - staging
# jobs:
# deploy:
# runs-on: ubuntu-latest
# strategy:
# matrix:
# node-version: [22.x]
# steps:
# - name: Checkout code
# uses: actions/checkout@v4
# - name: Set up Node.js ${{ matrix.node-version }}
# uses: actions/setup-node@v4
# with:
# node-version: ${{ matrix.node-version }}
# - name: Set up SSH
# env:
# SSH_PRIVATE_KEY_NEW: ${{ secrets.SSH_THIRD_PRIVATE_KEY }}
# KNOWN_HOSTS: ${{ secrets.KNOWN_HOSTS }}
# run: |
# mkdir -p ~/.ssh
# echo "$SSH_PRIVATE_KEY_NEW" > ~/.ssh/id_rsa
# chmod 600 ~/.ssh/id_rsa
# eval $(ssh-agent -s)
# ssh-add ~/.ssh/id_rsa
# echo "$KNOWN_HOSTS" > ~/.ssh/known_hosts
# - name: Configure SSH for easier access
# run: |
# echo "Host staging-server" >> ~/.ssh/config
# echo " HostName ${{ secrets.DO_IP_ADDRESS }}" >> ~/.ssh/config
# echo " User ${{ secrets.DO_USERNAME }}" >> ~/.ssh/config
# echo " IdentityFile ~/.ssh/id_rsa" >> ~/.ssh/config
# echo " StrictHostKeyChecking no" >> ~/.ssh/config
# - name: Deploy to DigitalOcean Droplet
# run: |
# ssh -o StrictHostKeyChecking=no -t staging-server << 'EOF'
# set -e
# cd ~/bluewave-onboarding
# git stash
# git pull
# docker compose down
# docker compose build
# docker compose up -d
# EOF