mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 17:00:15 +01:00
🐋 ci: deploy test server post-dev image build (#3596)
This commit is contained in:
parent
473859b0e2
commit
59ae2914aa
1 changed files with 37 additions and 0 deletions
37
.github/workflows/deploy-dev.yml
vendored
Normal file
37
.github/workflows/deploy-dev.yml
vendored
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
name: Update DigitalOcean Server
|
||||
|
||||
on:
|
||||
workflow_run:
|
||||
workflows: ["Docker Dev Images Build"]
|
||||
types:
|
||||
- completed
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
if: |
|
||||
github.repository == 'danny-avila/LibreChat' &&
|
||||
(github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success')
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install doctl
|
||||
uses: digitalocean/action-doctl@v2
|
||||
with:
|
||||
token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}
|
||||
|
||||
- name: Run update script on DigitalOcean Droplet
|
||||
run: |
|
||||
doctl compute ssh ${{ secrets.DO_DROPLET_NAME }} --ssh-command '
|
||||
sudo -i -u danny bash << EOF
|
||||
cd ~/LibreChat && \
|
||||
git fetch origin main && \
|
||||
git checkout do-deploy && \
|
||||
git rebase origin/main && \
|
||||
npm run update:deployed && \
|
||||
npm run start:deployed && \
|
||||
echo "Update completed. Application should be running now."
|
||||
EOF
|
||||
'
|
||||
Loading…
Add table
Add a link
Reference in a new issue