Deploys have failed since #178 because experimental-ext-skills was renamed to ext-skills on GitHub and the stale RepositoryCollaborators state 404s on update. Point config at the new name and drop the old resource from state before 'make up' (same approach as #126; remove after one green deploy). #168 also referenced SKILLS_OVER_MCP_IG, which #170 had renamed to SKILLS_OVER_MCP_WG, and left tobi-oye out of sort order, breaking tsc and 'npm run check'.
79 lines
2.4 KiB
YAML
79 lines
2.4 KiB
YAML
name: Deploy
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
env:
|
|
PULUMI_VERSION: "3.197.0"
|
|
|
|
jobs:
|
|
deploy-production:
|
|
name: Deploy to Production
|
|
runs-on: ubuntu-latest
|
|
environment: production
|
|
concurrency:
|
|
group: deploy-production
|
|
cancel-in-progress: false
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '22'
|
|
cache: 'npm'
|
|
|
|
- name: Setup Pulumi
|
|
uses: pulumi/actions@v6
|
|
with:
|
|
pulumi-version: ${{ env.PULUMI_VERSION }}
|
|
|
|
- name: Cache Pulumi plugins
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: ~/.pulumi/plugins
|
|
key: pulumi-plugins-${{ hashFiles('Pulumi.yaml') }}
|
|
restore-keys: |
|
|
pulumi-plugins-
|
|
|
|
- name: Install Pulumi packages
|
|
env:
|
|
GITHUB_TOKEN: ${{ github.token }}
|
|
run: pulumi install
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
|
|
- name: Build
|
|
run: npm run build
|
|
|
|
- name: Authenticate to Google Cloud
|
|
uses: google-github-actions/auth@v2
|
|
with:
|
|
credentials_json: ${{ secrets.GCP_PROD_SERVICE_ACCOUNT_KEY }}
|
|
|
|
- name: Deploy to Production
|
|
env:
|
|
PULUMI_PASSPHRASE: ${{ secrets.PULUMI_PROD_PASSPHRASE }}
|
|
GITHUB_TOKEN: ${{ secrets.PULUMI_GITHUB_TOKEN }}
|
|
ORG_BILLING_EMAIL: ${{ secrets.ORG_BILLING_EMAIL }}
|
|
DISCORD_BOT_TOKEN: ${{ secrets.DISCORD_BOT_TOKEN }}
|
|
DISCORD_GUILD_ID: ${{ secrets.DISCORD_GUILD_ID }}
|
|
run: |
|
|
echo "$PULUMI_PASSPHRASE" > passphrase.prod.txt
|
|
export PULUMI_CONFIG_PASSPHRASE_FILE=passphrase.prod.txt
|
|
pulumi login gs://mcp-access-prod-pulumi-state
|
|
# TEMP: drop stale state for renamed repo (experimental-ext-skills -> ext-skills).
|
|
# Delete-on-up 404s because the old repo name is gone. Remove after one successful deploy.
|
|
pulumi state delete 'urn:pulumi:prod::mcp-access::github:index/repositoryCollaborators:RepositoryCollaborators::repo-experimental-ext-skills' --stack prod --yes || true
|
|
pulumi config set discord:guildId "$DISCORD_GUILD_ID" --stack prod
|
|
pulumi config set discord:botToken "$DISCORD_BOT_TOKEN" --secret --stack prod
|
|
pulumi config set githubBillingEmail "$ORG_BILLING_EMAIL" --secret --stack prod
|
|
make up
|