ci: deploy test server post-dev image build pt. 2

This commit is contained in:
Danny Avila 2024-08-09 02:39:29 -04:00 committed by GitHub
parent 59ae2914aa
commit 8a9476a795
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -17,15 +17,19 @@ jobs:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Install doctl - name: Install SSH Key
uses: digitalocean/action-doctl@v2 uses: shimataro/ssh-key-action@v2
with: with:
token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }} key: ${{ secrets.DO_SSH_PRIVATE_KEY }}
known_hosts: ${{ secrets.DO_KNOWN_HOSTS }}
- name: Run update script on DigitalOcean Droplet - name: Run update script on DigitalOcean Droplet
env:
DO_HOST: ${{ secrets.DO_HOST }}
DO_USER: ${{ secrets.DO_USER }}
run: | run: |
doctl compute ssh ${{ secrets.DO_DROPLET_NAME }} --ssh-command ' ssh -o StrictHostKeyChecking=no ${DO_USER}@${DO_HOST} << EOF
sudo -i -u danny bash << EOF sudo -i -u danny bash << EEOF
cd ~/LibreChat && \ cd ~/LibreChat && \
git fetch origin main && \ git fetch origin main && \
git checkout do-deploy && \ git checkout do-deploy && \
@ -33,5 +37,5 @@ jobs:
npm run update:deployed && \ npm run update:deployed && \
npm run start:deployed && \ npm run start:deployed && \
echo "Update completed. Application should be running now." echo "Update completed. Application should be running now."
EEOF
EOF EOF
'