Skip to content

Merge pull request #294 from pankajjs/feat/create-onboarding-extensio… #134

Merge pull request #294 from pankajjs/feat/create-onboarding-extensio…

Merge pull request #294 from pankajjs/feat/create-onboarding-extensio… #134

name: Register and deploy Slash Commands
on:
push:
branches: develop
jobs:
Environment-Variables-Check:
runs-on: ubuntu-latest
environment: staging
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18.18.2
- run: npm install
- run: npm run env-var-check
env:
CURRENT_ENVIRONMENT: staging
DISCORD_APPLICATION_ID: ${{secrets.DISCORD_APPLICATION_ID}}
DISCORD_GUILD_ID: ${{secrets.DISCORD_GUILD_ID}}
DISCORD_TOKEN: ${{secrets.DISCORD_TOKEN}}
DISCORD_PUBLIC_KEY: ${{secrets.DISCORD_PUBLIC_KEY}}
CLOUDFLARE_API_TOKEN: ${{secrets.CLOUDFLARE_API_TOKEN}}
CLOUDFLARE_ACCOUNT_ID: ${{secrets.CLOUDFLARE_ACCOUNT_ID}}
BOT_PRIVATE_KEY: ${{secrets.BOT_PRIVATE_KEY}}
RDS_SERVERLESS_PUBLIC_KEY: ${{secrets.RDS_SERVERLESS_PUBLIC_KEY}}
CRON_JOBS_PUBLIC_KEY: ${{secrets.CRON_JOBS_PUBLIC_KEY}}
IDENTITY_SERVICE_PUBLIC_KEY: ${{secrets.IDENTITY_SERVICE_PUBLIC_KEY}}
AWS_READ_ACCESS_GROUP_ID: ${{secrets.AWS_READ_ACCESS_GROUP_ID}}
Register-Commands:
needs: [Environment-Variables-Check]
runs-on: ubuntu-latest
environment: staging
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18.18.2
- run: npm install
- run: npm run register
env:
DISCORD_TOKEN: ${{secrets.DISCORD_TOKEN}}
DISCORD_APPLICATION_ID: ${{secrets.DISCORD_APPLICATION_ID}}
DISCORD_GUILD_ID: ${{secrets.DISCORD_GUILD_ID}}
AWS_READ_ACCESS_GROUP_ID: ${{secrets.AWS_READ_ACCESS_GROUP_ID}}
Deploy-to-Cloudflare:
needs: [Register-Commands]
runs-on: ubuntu-latest
environment: staging
steps:
- uses: actions/checkout@v4
- run: npm install
- uses: cloudflare/wrangler-action@2.0.0
with:
apiToken: ${{secrets.CLOUDFLARE_API_TOKEN}}
accountId: ${{secrets.CLOUDFLARE_ACCOUNT_ID}}
secrets: |
DISCORD_PUBLIC_KEY
DISCORD_TOKEN
DISCORD_GUILD_ID
CURRENT_ENVIRONMENT
BOT_PRIVATE_KEY
RDS_SERVERLESS_PUBLIC_KEY
CRON_JOBS_PUBLIC_KEY
IDENTITY_SERVICE_PUBLIC_KEY
AWS_READ_ACCESS_GROUP_ID
env:
CURRENT_ENVIRONMENT: staging
CLOUDFLARE_API_TOKEN: ${{secrets.CLOUDFLARE_API_TOKEN}}
DISCORD_PUBLIC_KEY: ${{secrets.DISCORD_PUBLIC_KEY}}
DISCORD_TOKEN: ${{secrets.DISCORD_TOKEN}}
BOT_PRIVATE_KEY: ${{secrets.BOT_PRIVATE_KEY}}
DISCORD_GUILD_ID: ${{secrets.DISCORD_GUILD_ID}}
RDS_SERVERLESS_PUBLIC_KEY: ${{secrets.RDS_SERVERLESS_PUBLIC_KEY}}
CRON_JOBS_PUBLIC_KEY: ${{secrets.CRON_JOBS_PUBLIC_KEY}}
IDENTITY_SERVICE_PUBLIC_KEY: ${{secrets.IDENTITY_SERVICE_PUBLIC_KEY}}
AWS_READ_ACCESS_GROUP_ID: ${{secrets.AWS_READ_ACCESS_GROUP_ID}}