Don't scope staging to a specific guild #42
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
name: Deploy to Staging | |
on: | |
push: | |
branches: | |
- staging | |
jobs: | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
env: | |
NODE_OPTIONS: --unhandled-rejections=strict | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version-file: .nvmrc | |
cache: npm | |
- name: Install Dependencies | |
run: npm ci | |
- name: Run Tests | |
run: npm test | |
deploy: | |
name: Deploy | |
needs: test | |
runs-on: ubuntu-latest | |
environment: | |
name: staging | |
url: https://dns-over-discord-staging.v4.wtf/invite | |
env: | |
NODE_OPTIONS: --unhandled-rejections=strict | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version-file: .nvmrc | |
cache: npm | |
- name: Install Dependencies | |
run: npm ci | |
- name: Generate staging.env | |
run: envsubst < staging.env.sample > staging.env | |
env: | |
CLIENT_ID: ${{ secrets.STAGING_CLIENT_ID }} | |
CLIENT_SECRET: ${{ secrets.STAGING_CLIENT_SECRET }} | |
CLIENT_PUBLIC_KEY: ${{ secrets.STAGING_CLIENT_PUBLIC_KEY }} | |
SENTRY_AUTH_TOKEN: ${{ secrets.STAGING_SENTRY_AUTH_TOKEN }} | |
SENTRY_ORG: ${{ secrets.STAGING_SENTRY_ORG }} | |
SENTRY_PROJECT: ${{ secrets.STAGING_SENTRY_PROJECT }} | |
SENTRY_DSN: ${{ secrets.STAGING_SENTRY_DSN }} | |
- name: Publish to Staging | |
run: npm run publish:staging | |
env: | |
CF_API_TOKEN: ${{ secrets.CF_API_TOKEN }} |