Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 954103510a | |||
| 801e1f81d9 | |||
| f9861480aa |
@@ -4,6 +4,7 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
workflow_dispatch: # Allow manual triggering
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
mirror:
|
mirror:
|
||||||
@@ -19,11 +20,22 @@ jobs:
|
|||||||
git config --global user.name "the-luap"
|
git config --global user.name "the-luap"
|
||||||
git config --global user.email "paul-nothaft@hotmail.de"
|
git config --global user.email "paul-nothaft@hotmail.de"
|
||||||
|
|
||||||
|
- name: Debug - Show current branch and status
|
||||||
|
run: |
|
||||||
|
echo "Current branch:"
|
||||||
|
git branch -a
|
||||||
|
echo "Git status:"
|
||||||
|
git status
|
||||||
|
echo "Remote info:"
|
||||||
|
git remote -v
|
||||||
|
|
||||||
- name: Create filtered branch
|
- name: Create filtered branch
|
||||||
run: |
|
run: |
|
||||||
|
# Clean up any existing github-mirror branch
|
||||||
|
git branch -D github-mirror || true
|
||||||
|
|
||||||
# Create a new branch for GitHub
|
# Create a new branch for GitHub
|
||||||
git checkout --orphan -b github-mirror
|
git checkout --orphan github-mirror
|
||||||
|
|
||||||
# Remove sensitive files/directories
|
# Remove sensitive files/directories
|
||||||
# Example: Remove .env files, private configs, etc.
|
# Example: Remove .env files, private configs, etc.
|
||||||
@@ -43,17 +55,45 @@ jobs:
|
|||||||
git rm -r --cached CLAUDE.md || true
|
git rm -r --cached CLAUDE.md || true
|
||||||
git rm -r --cached PRODUCTION_DEPLOYMENT_GUIDE.md || true
|
git rm -r --cached PRODUCTION_DEPLOYMENT_GUIDE.md || true
|
||||||
git rm -r --cached logs/ || true
|
git rm -r --cached logs/ || true
|
||||||
|
git rm -r --cached frontend/.claudedocs/ || true
|
||||||
|
git rm -r --cached test-maintenance.sh || true
|
||||||
|
git rm -r --cached storage/ || true
|
||||||
|
|
||||||
|
|
||||||
# Commit the changes
|
# Commit the changes
|
||||||
git commit -m "Remove sensitive files for GitHub mirror" || true
|
git commit -m "Remove sensitive files for GitHub mirror" || 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
|
- name: Push to GitHub
|
||||||
env:
|
env:
|
||||||
GITHUBTOKEN: ${{ secrets.GITHUBTOKEN }}
|
GITHUBTOKEN: ${{ secrets.GITHUBTOKEN }}
|
||||||
run: |
|
run: |
|
||||||
|
# Remove existing github remote if it exists
|
||||||
|
git remote remove github || true
|
||||||
|
|
||||||
# Add GitHub remote
|
# Add GitHub remote
|
||||||
git remote add github https://x-access-token:${GITHUBTOKEN}@github.com/the-luap/picpeak.git
|
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
|
||||||
|
|
||||||
# Force push the filtered branch to GitHub main
|
# Force push the filtered branch to GitHub main
|
||||||
|
echo "Pushing to GitHub..."
|
||||||
git push github github-mirror:main --force
|
git push github github-mirror:main --force
|
||||||
|
echo "Push completed successfully!"
|
||||||
|
|
||||||
|
- name: Workflow completed
|
||||||
|
run: |
|
||||||
|
echo "✅ Mirror to GitHub workflow completed successfully!"
|
||||||
|
echo "Check https://github.com/the-luap/picpeak to verify the mirror."
|
||||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "picpeak-backend",
|
"name": "picpeak-backend",
|
||||||
"version": "1.0.40",
|
"version": "1.0.41",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "picpeak-backend",
|
"name": "picpeak-backend",
|
||||||
"version": "1.0.40",
|
"version": "1.0.41",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"adm-zip": "^0.5.16",
|
"adm-zip": "^0.5.16",
|
||||||
"archiver": "^5.3.1",
|
"archiver": "^5.3.1",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "picpeak-backend",
|
"name": "picpeak-backend",
|
||||||
"version": "1.0.40",
|
"version": "1.0.41",
|
||||||
"description": "Backend for PicPeak event photo sharing platform",
|
"description": "Backend for PicPeak event photo sharing platform",
|
||||||
"main": "server.js",
|
"main": "server.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "picpeak-frontend",
|
"name": "picpeak-frontend",
|
||||||
"version": "1.0.40",
|
"version": "1.0.41",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "picpeak-frontend",
|
"name": "picpeak-frontend",
|
||||||
"version": "1.0.40",
|
"version": "1.0.41",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@tanstack/react-query": "^5.0.0",
|
"@tanstack/react-query": "^5.0.0",
|
||||||
"@tiptap/extension-link": "^2.25.0",
|
"@tiptap/extension-link": "^2.25.0",
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "picpeak-frontend",
|
"name": "picpeak-frontend",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "1.0.40",
|
"version": "1.0.41",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
|
|||||||
@@ -162,7 +162,7 @@ export const PhotoLightbox: React.FC<PhotoLightboxProps> = ({
|
|||||||
{/* Close button */}
|
{/* Close button */}
|
||||||
<button
|
<button
|
||||||
onClick={onClose}
|
onClick={onClose}
|
||||||
className="absolute top-4 right-4 p-2 bg-white/10 hover:bg-white/20 rounded-full transition-colors z-10"
|
className="absolute top-4 right-4 p-2 bg-white/10 hover:bg-white/20 rounded-full transition-colors z-20"
|
||||||
aria-label="Close"
|
aria-label="Close"
|
||||||
>
|
>
|
||||||
<X className="w-6 h-6 text-white" />
|
<X className="w-6 h-6 text-white" />
|
||||||
@@ -171,7 +171,7 @@ export const PhotoLightbox: React.FC<PhotoLightboxProps> = ({
|
|||||||
{/* Navigation buttons */}
|
{/* Navigation buttons */}
|
||||||
<button
|
<button
|
||||||
onClick={goToPrevious}
|
onClick={goToPrevious}
|
||||||
className="absolute left-4 top-1/2 -translate-y-1/2 p-2 bg-white/10 hover:bg-white/20 rounded-full transition-colors z-10"
|
className="absolute left-4 top-1/2 -translate-y-1/2 p-2 bg-white/10 hover:bg-white/20 rounded-full transition-colors z-20"
|
||||||
aria-label="Previous photo"
|
aria-label="Previous photo"
|
||||||
>
|
>
|
||||||
<ChevronLeft className="w-6 h-6 text-white" />
|
<ChevronLeft className="w-6 h-6 text-white" />
|
||||||
@@ -179,20 +179,19 @@ export const PhotoLightbox: React.FC<PhotoLightboxProps> = ({
|
|||||||
|
|
||||||
<button
|
<button
|
||||||
onClick={goToNext}
|
onClick={goToNext}
|
||||||
className="absolute right-4 top-1/2 -translate-y-1/2 p-2 bg-white/10 hover:bg-white/20 rounded-full transition-colors z-10"
|
className="absolute right-4 top-1/2 -translate-y-1/2 p-2 bg-white/10 hover:bg-white/20 rounded-full transition-colors z-20"
|
||||||
aria-label="Next photo"
|
aria-label="Next photo"
|
||||||
>
|
>
|
||||||
<ChevronRight className="w-6 h-6 text-white" />
|
<ChevronRight className="w-6 h-6 text-white" />
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
{/* Bottom toolbar */}
|
{/* Bottom toolbar */}
|
||||||
<div className="absolute bottom-0 left-0 right-0 bg-gradient-to-t from-black/80 to-transparent p-4">
|
<div className="absolute bottom-0 left-0 right-0 bg-gradient-to-t from-black/80 to-transparent p-4 z-20">
|
||||||
<div className="max-w-4xl mx-auto flex items-center justify-between">
|
<div className="max-w-4xl mx-auto flex items-center justify-between">
|
||||||
<div className="text-white">
|
<div className="text-white">
|
||||||
<p className="text-sm opacity-75">
|
<p className="text-sm opacity-75">
|
||||||
{currentIndex + 1} / {photos.length}
|
{currentIndex + 1} / {photos.length}
|
||||||
</p>
|
</p>
|
||||||
<p className="font-medium">{currentPhoto.filename}</p>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center gap-2">
|
||||||
@@ -231,7 +230,7 @@ export const PhotoLightbox: React.FC<PhotoLightboxProps> = ({
|
|||||||
|
|
||||||
{/* Image container */}
|
{/* Image container */}
|
||||||
<div
|
<div
|
||||||
className="absolute inset-0 flex items-center justify-center"
|
className="absolute inset-0 flex items-center justify-center z-0"
|
||||||
onClick={handleImageClick}
|
onClick={handleImageClick}
|
||||||
onMouseDown={handleMouseDown}
|
onMouseDown={handleMouseDown}
|
||||||
onMouseMove={handleMouseMove}
|
onMouseMove={handleMouseMove}
|
||||||
@@ -257,7 +256,7 @@ export const PhotoLightbox: React.FC<PhotoLightboxProps> = ({
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Touch/swipe indicators for mobile */}
|
{/* Touch/swipe indicators for mobile */}
|
||||||
<div className="absolute bottom-20 left-1/2 -translate-x-1/2 text-white text-sm opacity-50 pointer-events-none md:hidden">
|
<div className="absolute bottom-20 left-1/2 -translate-x-1/2 text-white text-sm opacity-50 pointer-events-none md:hidden z-20">
|
||||||
Swipe to navigate
|
Swipe to navigate
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user