-
Notifications
You must be signed in to change notification settings - Fork 1
44 lines (38 loc) · 1.11 KB
/
deep-sea-stories-deploy.yml
File metadata and controls
44 lines (38 loc) · 1.11 KB
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
name: Deploy deep-sea-stories
on:
push:
branches: ["main"]
workflow_dispatch:
inputs:
branch:
description: "Branch to deploy"
required: true
default: "main"
type: string
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ inputs.branch || github.ref }}
- name: Deploy
uses: appleboy/ssh-action@v0.1.7
with:
host: ${{ secrets.VM_HOST }}
username: ${{ secrets.VM_USERNAME }}
key: ${{ secrets.VM_SSH_KEY }}
script: |
cd ~/examples/deep-sea-stories
git fetch --all
git switch ${{ inputs.branch || 'main' }}
git pull
umask 077
cat > .env << 'EOF'
FISHJAM_ID=${{ secrets.FISHJAM_ID }}
FISHJAM_MANAGEMENT_TOKEN=${{ secrets.FISHJAM_MANAGEMENT_TOKEN }}
ELEVENLABS_API_KEY=${{ secrets.ELEVENLABS_API_KEY }}
GEMINI_API_KEY=${{ secrets.GEMINI_API_KEY }}
EOF
docker compose down
docker compose up -d --build