This commit is contained in:
@@ -32,17 +32,19 @@ jobs:
|
||||
|
||||
- name: Applying database migrations
|
||||
run: |
|
||||
echo "Creating migrations folder 📂"
|
||||
ssh -p ${{ secrets.SERVER_PORT }} ${{ secrets.SERVER_USER }}@${{ secrets.SERVER_IP }} "mkdir -p /var/www/greenlight/migrations"
|
||||
echo "Copy migrations files 📑"
|
||||
scp -r ./migrations ${{ secrets.SERVER_PORT }} ${{ secrets.SERVER_USER }}@${{ secrets.SERVER_IP }}:/var/www/greenlight/migrations
|
||||
|
||||
ssh -p ${{ secrets.SERVER_PORT }} ${{ secrets.SERVER_USER }}@${{ secrets.SERVER_IP }} '
|
||||
set -e
|
||||
cd /var/www/greenlight
|
||||
|
||||
echo "Running migrations..."
|
||||
echo "Running migrations ⚙️"
|
||||
migrate -path=./migrations -database "$GREENLIGHT_DB_DSN" up
|
||||
|
||||
echo "Cleaning..."
|
||||
echo "Cleaning 🧹"
|
||||
cd .. && rm -rf greenlight
|
||||
'
|
||||
"
|
||||
|
||||
Reference in New Issue
Block a user