From 485fab50bd3ea59a02a2b6eed5056c34910df3d6 Mon Sep 17 00:00:00 2001 From: Claude Code Date: Mon, 7 Jul 2025 19:30:05 -0400 Subject: [PATCH] Add GitHub mirror README and remove workflows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add .github/README.md for GitHub mirror with clear indication this is a read-only mirror - Remove GitHub Actions workflow since deployments are handled from primary repository - Direct all contributions to primary repository at git.deco.sh πŸ€– Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- .github/README.md | 52 ++++++++++++ .github/workflows/deploy-scripts.yml | 113 --------------------------- 2 files changed, 52 insertions(+), 113 deletions(-) create mode 100644 .github/README.md delete mode 100644 .github/workflows/deploy-scripts.yml diff --git a/.github/README.md b/.github/README.md new file mode 100644 index 0000000..4d93dbf --- /dev/null +++ b/.github/README.md @@ -0,0 +1,52 @@ +# ❄️ Great Lakes Ice Report (Mirror) + +> **⚠️ This is a read-only mirror** of the primary repository hosted at https://git.deco.sh/deco/ice + +## 🏠 Primary Repository + +For the latest code, issues, pull requests, and discussions, please visit: + +**β†’ https://git.deco.sh/deco/ice** + +## πŸ“‹ About This Project + +A community-driven web application for tracking winter road conditions and icy hazards in the Great Lakes region. Reports automatically expire after 48 hours to maintain current information. + +### Key Features +- πŸ—ΊοΈ Interactive map with real-time location tracking +- πŸ“± Progressive Web App - works offline +- 🌐 Internationalization (English & Spanish) +- 🚫 Works completely without JavaScript +- πŸ”’ Privacy-focused with no user tracking + +## 🀝 Contributing + +Please submit all issues and pull requests to the primary repository at https://git.deco.sh/deco/ice + +## πŸ“¦ Quick Start + +```bash +# Clone from the primary repository +git clone https://git.deco.sh/deco/ice.git + +# Or if you prefer SSH +git clone ssh://git@git.deco.sh:deco/ice.git + +cd ice +npm install +cp .env.example .env +# Add your Mapbox token to .env +npm start +``` + +## πŸ”„ Synchronization + +This mirror is automatically synchronized with the primary repository. Updates typically appear within minutes of being pushed to the main repository. + +## πŸ“„ License + +MIT License - see LICENSE file for details + +--- + +**Why self-hosted?** We believe in data ownership and digital sovereignty. By hosting our primary repository on our own infrastructure, we maintain full control over our code and development process while using GitHub as a discovery platform. \ No newline at end of file diff --git a/.github/workflows/deploy-scripts.yml b/.github/workflows/deploy-scripts.yml deleted file mode 100644 index 86423e9..0000000 --- a/.github/workflows/deploy-scripts.yml +++ /dev/null @@ -1,113 +0,0 @@ -name: Deploy Scripts to S3 - -on: - push: - branches: [ main ] - paths: - - 'scripts/**' - - '.github/workflows/deploy-scripts.yml' - workflow_dispatch: - -permissions: - id-token: write - contents: write - pull-requests: write - -jobs: - deploy-scripts: - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Configure AWS credentials using OIDC - uses: aws-actions/configure-aws-credentials@v4 - with: - role-to-assume: ${{ secrets.AWS_ROLE_ARN }} - aws-region: ${{ secrets.AWS_REGION }} - role-session-name: icewatch-deploy-scripts - - - name: Upload deployment script to S3 - run: | - # Upload the main deployment script - aws s3 cp scripts/deploy.sh s3://${{ secrets.S3_BUCKET_NAME }}/scripts/deploy.sh \ - --content-type "text/plain" \ - --cache-control "max-age=300" \ - --metadata-directive REPLACE \ - --metadata "version=$(git rev-parse --short HEAD),updated=$(date -u +%Y-%m-%dT%H:%M:%SZ)" - - # Upload systemd service file - aws s3 cp scripts/icewatch.service s3://${{ secrets.S3_BUCKET_NAME }}/scripts/icewatch.service \ - --content-type "text/plain" \ - --cache-control "max-age=3600" - - # Upload Caddyfile - aws s3 cp scripts/Caddyfile s3://${{ secrets.S3_BUCKET_NAME }}/scripts/Caddyfile \ - --content-type "text/plain" \ - --cache-control "max-age=3600" - - echo "βœ… Scripts uploaded successfully!" - echo "πŸ“ Deploy script URL: https://${{ secrets.S3_BUCKET_NAME }}.s3.amazonaws.com/scripts/deploy.sh" - - - name: Update README with current URLs - run: | - # Update README with current S3 URLs - sed -i "s|curl -sSL.*deploy.sh|curl -sSL https://${{ secrets.S3_BUCKET_NAME }}.s3.amazonaws.com/scripts/deploy.sh|g" README.md - - # Check if README was modified - if git diff --quiet README.md; then - echo "No README updates needed" - else - echo "README updated with new S3 URLs" - - # Get current branch name - CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD) - echo "Current branch: $CURRENT_BRANCH" - - if [[ "$CURRENT_BRANCH" == "main" ]]; then - echo "On main branch - creating PR instead of direct commit" - - # Create a new branch for the update - BRANCH_NAME="update-readme-urls-$(date +%Y%m%d-%H%M%S)" - git checkout -b "$BRANCH_NAME" - - # Configure git and commit changes - git config --local user.email "action@github.com" - git config --local user.name "GitHub Action" - git add README.md - git commit -m "Update deployment URLs - - - Updated S3 URLs in README.md - - Deploy script URL: https://${{ secrets.S3_BUCKET_NAME }}.s3.amazonaws.com/scripts/deploy.sh" - - # Push the new branch - git push origin "$BRANCH_NAME" - - # Create PR using GitHub CLI - gh pr create \ - --title "Update deployment URLs in README" \ - --body "πŸ€– **Automated update from deployment workflow** - - This PR updates the deployment URLs in README.md with the current S3 bucket URLs. - - **Changes:** - - Updated deploy script URL to: https://${{ secrets.S3_BUCKET_NAME }}.s3.amazonaws.com/scripts/deploy.sh - - **Generated by:** ${{ github.workflow }} workflow - **Commit:** ${{ github.sha }}" \ - --head "$BRANCH_NAME" \ - --base "main" - - echo "βœ… PR created successfully!" - else - echo "Not on main branch - committing directly" - git config --local user.email "action@github.com" - git config --local user.name "GitHub Action" - git add README.md - git commit -m "Update deployment URLs [skip ci]" - git push - fi - fi - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}