Skip to content

Commit b572192

Browse files
committed
add deploy.sh
1 parent 1bceddd commit b572192

File tree

2 files changed

+38
-5
lines changed

2 files changed

+38
-5
lines changed

.github/workflows/deploy.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Deploy to ReflexCloud
1+
name: deploy
22

33
on:
44
push:
@@ -30,7 +30,4 @@ jobs:
3030
steps:
3131
- uses: actions/checkout@v3
3232
- name: Deploy to ReflexCloud
33-
run: |
34-
echo "Deploying ${{ matrix.folder }}"
35-
# Add your deployment script here
36-
# Example: deploy.sh ${{ matrix.folder }}
33+
run: deploy.sh ${{ matrix.folder }}

deploy.sh

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#!/bin/bash
2+
3+
# Exit immediately if a command exits with a non-zero status
4+
set -e
5+
6+
# Validate input
7+
if [ -z "$1" ]; then
8+
echo "Error: No subfolder specified."
9+
echo "Usage: $0 <subfolder>"
10+
exit 1
11+
fi
12+
13+
SUBFOLDER=$1
14+
15+
# Ensure the subfolder exists
16+
if [ ! -d "$SUBFOLDER" ]; then
17+
echo "Error: Subfolder '$SUBFOLDER' does not exist."
18+
exit 1
19+
fi
20+
21+
# Navigate to the subfolder
22+
cd "$SUBFOLDER"
23+
24+
# Print the current working directory for debugging
25+
echo "Deploying content from: $(pwd)"
26+
27+
# Add deployment logic here
28+
# For example, deploying with Reflex CLI
29+
if ! command -v reflex &> /dev/null; then
30+
echo "Error: Reflex CLI not found. Please ensure it is installed."
31+
exit 1
32+
fi
33+
34+
echo "Starting deployment..."
35+
# reflex deploy # Adjust with actual Reflex deploy command
36+
echo "Deployment for '$SUBFOLDER' completed successfully."

0 commit comments

Comments
 (0)