acmcsufoss / lc-dailies

Daily Leetcode challenges for members to practice their algorithms.
https://acmcsuf.com/lc-dailies
MIT License
2 stars 0 forks source link

Create `cf.yaml` workflow #19

Closed EthanThatOneKid closed 10 months ago

EthanThatOneKid commented 10 months ago

Resolves #17!

This workflow deploys our daily scheduled worker cf/dailies/dailies.ts to Cloudflare.

TODO

EthanThatOneKid commented 10 months ago

Repository secrets CF_ACCOUNT_ID, CF_API_TOKEN, and WEBHOOK_URL are added successfully. We shall test in main to proceed in registering this GitHub workflow.

Repository secrets:Repository secrets

EthanThatOneKid commented 10 months ago

Thank you for the fast review, @karnikaavelumani! :godmode:

EthanThatOneKid commented 10 months ago

🙈 One problem:

error: Uncaught (in promise) MissingEnvVarsError: The following variables were defined in the example file but are not present in the environment:
  PORT, WEBHOOK_TOKEN, DISCORD_APPLICATION_ID, DISCORD_TOKEN, DISCORD_PUBLIC_KEY, DISCORD_WEBHOOK_URL, DISCORD_CHANNEL_ID

Make sure to add them to your env file.

If you expect any of these variables to be empty, you can set the allowEmptyValues option to true.
    throw new MissingEnvVarsError(
          ^
    at assertSafe (https://deno.land/std@0.201.0/dotenv/mod.ts:417:11)
    at load (https://deno.land/std@0.201.0/dotenv/mod.ts:336:5)
    at eventLoopTick (ext:core/01_core.js:183:11)
    at async file:///home/runner/work/lc-dailies/lc-dailies/cf/dailies/env.ts:7:1
Error: Process completed with exit code 1.