github workflow fixes

This commit is contained in:
Henri
2026-04-08 00:39:29 +03:00
parent 031706714c
commit 3f6c7abec3

View File

@@ -4,7 +4,7 @@ name: Build and Deploy to Production
env: env:
SOURCE_BRANCH: v2 # Change this to your desired trigger branch SOURCE_BRANCH: v2 # Change this to your desired trigger branch
PRODUCTION_BRANCH: production # Change this to your desired output branch PRODUCTION_BRANCH: production # Change this to your desired output branch
NODE_VERSION: "20" # Specify Node version for consistency NODE_VERSION: "24" # Specify Node version for consistency
on: on:
push: push:
@@ -37,11 +37,11 @@ jobs:
- name: Prepare for deployment - name: Prepare for deployment
run: | run: |
# Remove source files, keep only dist # Keep only the build output and git metadata
rm -rf src public package.json node_modules vite.config.js svelte.config.js tailwind.config.js README.md find . -mindepth 1 -maxdepth 1 ! -name .git ! -name dist -exec rm -rf {} +
# Move build output to root # Copy build output to repo root (includes files from public/)
mv dist/* . cp -a dist/. .
rmdir dist rm -rf dist
- name: Deploy to production branch - name: Deploy to production branch
run: | run: |