8a0a4436b0
Mirror to GitHub / mirror (push) Successful in 38s
Test and Lint / backend-test (push) Successful in 1m41s
continuous-integration/drone/push Build is passing
Test and Lint / frontend-test (push) Successful in 2m21s
Version and Release / version-bump (push) Successful in 48s
Version and Release / trigger-drone (push) Has been skipped
- Updated all core migrations to use ../../src/ instead of ../src/ - Updated legacy migrations with the same path fix - This fixes MODULE_NOT_FOUND errors during deployment The error occurred because migrations were moved one level deeper into core/ and legacy/ subdirectories without updating the relative paths to the source files.
88 lines
2.7 KiB
YAML
88 lines
2.7 KiB
YAML
name: Mirror to GitHub
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
workflow_dispatch: # Allow manual triggering
|
|
|
|
jobs:
|
|
mirror:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0 # Full history for proper mirroring
|
|
|
|
- name: Setup Git
|
|
run: |
|
|
git config --global user.name "the-luap"
|
|
git config --global user.email "paul-nothaft@hotmail.de"
|
|
|
|
- name: Remove sensitive files and directories
|
|
run: |
|
|
echo "Current files before cleanup:"
|
|
ls -la | head -10 || true
|
|
echo "..."
|
|
|
|
# Remove sensitive files/directories if they exist
|
|
echo "Removing sensitive files..."
|
|
rm -rf .gitea/ || true
|
|
rm -rf scripts/ || true
|
|
rm -rf .drone* || true
|
|
rm -rf photo-sharing-prd.md || true
|
|
rm -rf CLAUDE.md || true
|
|
rm -rf storage/ || true
|
|
|
|
|
|
|
|
echo "Sensitive files removal completed"
|
|
|
|
# Add and commit the cleanup if there are changes
|
|
git add -A
|
|
if ! git diff --cached --quiet; then
|
|
git commit -m "chore: remove sensitive files for GitHub mirror"
|
|
echo "✅ Committed cleanup of sensitive files"
|
|
else
|
|
echo "✅ No sensitive files to remove"
|
|
fi
|
|
|
|
echo "Final file structure (top level):"
|
|
ls -la | head -10 || true
|
|
|
|
- name: Check GitHub token
|
|
env:
|
|
GITHUBTOKEN: ${{ secrets.GITHUBTOKEN }}
|
|
run: |
|
|
if [ -z "$GITHUBTOKEN" ]; then
|
|
echo "ERROR: GITHUBTOKEN secret is not set!"
|
|
exit 1
|
|
else
|
|
echo "GitHub token is available (length: ${#GITHUBTOKEN})"
|
|
fi
|
|
|
|
- name: Push to GitHub
|
|
env:
|
|
GITHUBTOKEN: ${{ secrets.GITHUBTOKEN }}
|
|
run: |
|
|
# Remove existing github remote if it exists
|
|
git remote remove github || true
|
|
|
|
# Add GitHub remote
|
|
git remote add github https://x-access-token:${GITHUBTOKEN}@github.com/the-luap/picpeak.git
|
|
|
|
# Verify remote was added
|
|
echo "GitHub remote added:"
|
|
git remote -v
|
|
|
|
# Push to GitHub main branch
|
|
echo "Pushing to GitHub..."
|
|
git push github main --force
|
|
echo "✅ Push to GitHub completed!"
|
|
|
|
- name: Workflow completed
|
|
run: |
|
|
echo "✅ Mirror to GitHub workflow completed successfully!"
|
|
echo "📊 Repository mirrored to: https://github.com/the-luap/picpeak"
|
|
echo "🔒 Sensitive files have been removed from the mirror" |