-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add scripts for auto creating dev night campaign (#2)
* wip: move to src direcet and wip config * wip: parse out event details * wip: render email with data * feat: add sync media script * feat: finish out dev night campaign creation * feat: update actions * fix: handle different campaign statuses
- Loading branch information
1 parent
abcdd7b
commit 15f6d4d
Showing
31 changed files
with
624 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
SGF_MEETUP_API_BASE_URL=https://sgf-meetup-api.opensgf.org | ||
SGF_MEETUP_API_TOKEN= | ||
LISTMONK_URL=https://newsletter.sgf.dev | ||
LISTMONK_USERNAME= | ||
LISTMONK_PASSWORD= | ||
DEV_NIGHT_LIST_ID= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: "Create Dev Night Email Campaign" | ||
on: | ||
workflow_dispatch: | ||
jobs: | ||
dev-night-campaign: | ||
name: Dev Night Campaign | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: '.nvmrc' | ||
- run: npm ci | ||
- run: npm run dev-night-campaign |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ on: | |
branches: | ||
- main | ||
jobs: | ||
lintk: | ||
lint: | ||
name: Lint PR | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: "Sync Media" | ||
on: | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
sync-media: | ||
name: Sync Media | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: '.nvmrc' | ||
- run: npm ci | ||
- run: npm run sync-media |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import 'dotenv/config'; | ||
import { _throw, parseNumber } from './util'; | ||
|
||
export const ASSET_BASE_URL = 'https://newsletter.sgf.dev/uploads'; | ||
|
||
export const SGF_DEVS_DISCORD_LINK = 'https://discord.com/invite/VNNJwJk'; | ||
export const SGF_DEVS_PROFILE_LINK = 'https://sgf.dev/register'; | ||
export const SGF_DEVS_TWITCH_LINK = 'https://www.twitch.tv/sgfdevs'; | ||
export const CENTRAL_TIMEZONE = 'America/Chicago'; | ||
|
||
export const SGF_MEETUP_API_BASE_URL = | ||
process.env.SGF_MEETUP_API_BASE_URL ?? | ||
_throw('SGF_MEETUP_API_BASE_URL env var not set'); | ||
|
||
export const SGF_MEETUP_API_TOKEN = | ||
process.env.SGF_MEETUP_API_TOKEN ?? | ||
_throw('SGF_MEETUP_API_TOKEN env var not set'); | ||
|
||
export const LISTMONK_URL = | ||
process.env.LISTMONK_URL ?? _throw('LISTMONK_URL env var not set'); | ||
|
||
export const LISTMONK_USERNAME = | ||
process.env.LISTMONK_USERNAME ?? | ||
_throw('LISTMONK_USERNAME env var not set'); | ||
|
||
export const LISTMONK_PASSWORD = | ||
process.env.LISTMONK_PASSWORD ?? | ||
_throw('LISTMONK_PASSWORD env var not set'); | ||
|
||
export const DEV_NIGHT_LIST_ID = | ||
parseNumber(process.env.DEV_NIGHT_LIST_ID) ?? | ||
_throw('DEV_NIGHT_LIST_ID env var not set or not a number'); |
Empty file.
Oops, something went wrong.