mirror of
https://github.com/Lapikud/lapikud.github.io.git
synced 2026-08-08 16:39:14 +00:00
github workflow fixes
This commit is contained in:
12
.github/workflows/build-deploy.yml
vendored
12
.github/workflows/build-deploy.yml
vendored
@@ -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: |
|
||||||
|
|||||||
Reference in New Issue
Block a user