diff --git a/.gitea/workflows/build-and-deploy.yml b/.gitea/workflows/build-and-deploy.yml deleted file mode 100644 index 771c418..0000000 --- a/.gitea/workflows/build-and-deploy.yml +++ /dev/null @@ -1,97 +0,0 @@ -name: Build & Deploy to EasyPanel - -on: - push: - branches: - - main - workflow_dispatch: - -jobs: - build-and-deploy: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: '20' - cache: 'npm' - - - name: Install dependencies - run: npm ci --no-audit --no-fund - - - name: Build Astro site - run: npm run build - - - name: Trigger EasyPanel redeploy - if: success() - env: - EASYPANEL_TOKEN: ${{ secrets.EASYPANEL_TOKEN }} - EASYPANEL_PROJECT_NAME: ${{ secrets.EASYPANEL_PROJECT_NAME }} - EASYPANEL_SERVICE_NAME: ${{ secrets.EASYPANEL_SERVICE_NAME }} - run: | - # EasyPanel tRPC endpoint for app service redeploy - EASYPANEL_API="https://panelwebsite.moreminimore.com/api" - DEPLOY_URL="${EASYPANEL_API}/trpc/services.app.deployService" - - # Guard: required secrets - if [ -z "$EASYPANEL_TOKEN" ] || [ -z "$EASYPANEL_PROJECT_NAME" ] || [ -z "$EASYPANEL_SERVICE_NAME" ]; then - echo "::warning::One or more required secrets are empty:" - [ -z "$EASYPANEL_TOKEN" ] && echo " - EASYPANEL_TOKEN" - [ -z "$EASYPANEL_PROJECT_NAME" ] && echo " - EASYPANEL_PROJECT_NAME" - [ -z "$EASYPANEL_SERVICE_NAME" ] && echo " - EASYPANEL_SERVICE_NAME" - echo "Skipping deploy trigger. Set these in repo settings to enable auto-deploy." - exit 0 - fi - - # tRPC mutation payload: {"json":{"projectName":"...","serviceName":"..."}} - PAYLOAD=$(jq -nc \ - --arg pj "$EASYPANEL_PROJECT_NAME" \ - --arg sv "$EASYPANEL_SERVICE_NAME" \ - '{json:{projectName:$pj, serviceName:$sv}}') - - echo "Triggering EasyPanel redeploy" - echo " Endpoint: $DEPLOY_URL" - echo " Project: $EASYPANEL_PROJECT_NAME" - echo " Service: $EASYPANEL_SERVICE_NAME" - echo " Payload: $PAYLOAD" - echo "" - - HTTP_CODE=$(curl -sS -o /tmp/easypanel-response.json -w "%{http_code}" \ - -X POST "$DEPLOY_URL" \ - -H "Authorization: Bearer *** \ - -H "Content-Type: application/json" \ - -d "$PAYLOAD") - - RESPONSE=$(cat /tmp/easypanel-response.json) - echo " HTTP $HTTP_CODE" - echo " Response: $RESPONSE" - - # 2xx = success - if [ "$HTTP_CODE" -ge 200 ] && [ "$HTTP_CODE" -lt 300 ]; then - echo "" - echo "EasyPanel redeploy triggered successfully" - exit 0 - fi - - # 4xx with explicit field errors = workflow is right, payload is wrong - if [ "$HTTP_CODE" -ge 400 ] && [ "$HTTP_CODE" -lt 500 ]; then - echo "::error::EasyPanel rejected the deploy request (HTTP $HTTP_CODE). See response above." - echo "::error::Likely the payload shape does not match what the panel expects." - echo "::error::Check https://panelwebsite.moreminimore.com/api for the procedure spec." - exit 1 - fi - - # 5xx = server error - echo "::error::EasyPanel API error (HTTP $HTTP_CODE). Response: $RESPONSE" - exit 1 - - - name: Upload build artifact - if: always() - uses: actions/upload-artifact@v4 - with: - name: dist - path: dist/ - retention-days: 7 diff --git a/.gitea/workflows/lint.yml b/.gitea/workflows/lint.yml deleted file mode 100644 index d260dac..0000000 --- a/.gitea/workflows/lint.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: Lint & Test - -on: - push: - branches: - - main - pull_request: - branches: - - main - -jobs: - build-check: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: '20' - cache: 'npm' - - run: npm ci --no-audit --no-fund - - name: Build (catches syntax + missing-image errors before deploy) - run: npm run build