diff --git a/.github/workflows/deploy-guard.yml b/.github/workflows/deploy-guard.yml deleted file mode 100644 index 9d2eb0a..0000000 --- a/.github/workflows/deploy-guard.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: Deploy Guard - -on: - pull_request: - branches: [main] - -jobs: - deploy-guard: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - - uses: actions/setup-python@v5 - with: - python-version: '3.11' - cache: 'pip' - - - name: Install test dependencies - run: pip install pytest - - - name: Run deploy guard tests - run: pytest tests/test_deploy_guard.py tests/test_sync_data.py -v -m "not live" - - - name: Validate sudoers syntax (Docker) - run: | - SUDOERS_FILES=$(find server/ -name 'sudoers-*' -type f) - if [ -z "$SUDOERS_FILES" ]; then - echo "No sudoers files found, skipping" - exit 0 - fi - docker run --rm -v "${{ github.workspace }}:/src:ro" -w /src ubuntu:24.04 \ - /bin/bash -c "apt-get update -qq && apt-get install -y -qq sudo >/dev/null 2>&1 && \ - find server/ -name 'sudoers-*' -exec visudo -cf {} \;" diff --git a/.github/workflows/deploy.yml.example b/.github/workflows/deploy.yml.example deleted file mode 100644 index eb6ece2..0000000 --- a/.github/workflows/deploy.yml.example +++ /dev/null @@ -1,26 +0,0 @@ -# Example deployment workflow -# Copy to .github/workflows/deploy.yml and configure secrets: -# SERVER_HOST - IP address or hostname of your server -# SERVER_USER - SSH user for deployment (e.g., "deploy") -# SERVER_SSH_KEY - Private SSH key for authentication -name: Deploy to Server - -on: - push: - branches: - - main - workflow_dispatch: - -jobs: - deploy: - runs-on: ubuntu-latest - steps: - - name: Deploy code - uses: appleboy/ssh-action@v1.0.3 - with: - host: ${{ secrets.SERVER_HOST }} - username: ${{ secrets.SERVER_USER }} - key: ${{ secrets.SERVER_SSH_KEY }} - script: | - cd /opt/data-analyst/repo - /opt/data-analyst/repo/server/deploy.sh