From: xangelo Date: Thu, 5 Dec 2024 21:11:53 +0000 (-0500) Subject: ci(github-actions): make github trigger DO deploy X-Git-Tag: v0.4.4~11 X-Git-Url: https://git.xangelo.ca/?a=commitdiff_plain;h=512fe30172f3d068736f380359cc85273d505744;p=risinglegends.git ci(github-actions): make github trigger DO deploy --- diff --git a/.do/app.yaml b/.do/app.yaml new file mode 100644 index 0000000..ab2d94c --- /dev/null +++ b/.do/app.yaml @@ -0,0 +1,54 @@ +alerts: +- rule: DEPLOYMENT_FAILED +- rule: DOMAIN_FAILED +domains: +- domain: risinglegends.net + type: PRIMARY +features: +- buildpack-stack=ubuntu-22 +ingress: + rules: + - component: + name: risinglegends + match: + path: + prefix: / +name: whale-app +region: nyc +services: +- environment_slug: node-js + envs: + - key: DATABASE_URL + scope: RUN_AND_BUILD_TIME + value: postgresql://postgres.jqzksnybdntehldnwrqw:HQNcegU0cuOaUC3e@aws-0-us-east-1.pooler.supabase.com:6543/postgres + - key: OTEL_ENABLED + scope: RUN_AND_BUILD_TIME + value: "true" + - key: OTEL_SERVICE_NAME + scope: RUN_AND_BUILD_TIME + value: rising-legends + - key: HONEYCOMB_API_KEY + scope: RUN_AND_BUILD_TIME + value: 87DRHIEz25Ll2ZhQNRDPwC + - key: AIRTABLE_API_KEY + scope: RUN_AND_BUILD_TIME + value: patkCjPkP3DplbFzY.945bf552ecaebf1010756e47c518b37bd8b52cb0ed0060f2737cda2cacbf6a9e + - key: RATE_LIMIT_WINDOW + scope: RUN_AND_BUILD_TIME + value: "30000" + - key: RATE_LIMIT_MAX_REQUESTS + scope: RUN_AND_BUILD_TIME + value: "15" + github: + branch: main + repo: AngeloR/risinglegends + http_port: 8080 + instance_count: 1 + instance_size_slug: apps-s-1vcpu-1gb-fixed + log_destinations: + - logtail: + token: adnSAie4xmJD8xSUrEasDVAz + name: betterstack + name: risinglegends + run_command: npm start + source_dir: / diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..9816d8a --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,33 @@ +name: Build + +on: + push: + branches: [ main ] + +permissions: + contents: read + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: '18.7.0' + cache: 'npm' + + - name: Install dependencies + run: npm ci + + - name: Build + run: npm run build + + - name: Deploy to Digital Ocean + uses: digitalocean/app_action/deploy@v2 + with: + token: ${{ secrets.DIGITAL_OCEAN_ACCESS_TOKEN }} + \ No newline at end of file