Skip to content

Commit

Permalink
ci(dev): try this
Browse files Browse the repository at this point in the history
  • Loading branch information
s4nt14go committed Sep 20, 2023
1 parent 903067d commit a0a1aaa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
export AWS_ACCESS_KEY_ID=`echo $CREDS | jq -r '.Credentials.AccessKeyId'`
export AWS_SECRET_ACCESS_KEY=`echo $CREDS | jq -r '.Credentials.SecretAccessKey'`
export AWS_SESSION_TOKEN=`echo $CREDS | jq -r '.Credentials.SessionToken'`
npm run deploy -- --stage dev
npm run deploy -- --stage $STAGE
npm run create-env
- name: Run migrations
Expand Down
9 changes: 2 additions & 7 deletions createEnv.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,12 @@
const stack = process.env.STACK;
const project = process.env.PROJECT;
const region = process.env.AWS_REGION;
if (!stack || !project || !region) {
const stage = process.env.STAGE;
if (!stack || !project || !region || !stage) {
console.log(process.env)
throw new Error(`Mandatory env var is missing`);
}

await $`ls -a`
await $`ls .sst`
await $`printenv`

const stage = fs.readFileSync('./.sst/stage');

await $`aws cloudformation describe-stack-resources \
--stack-name ${stage}-${project}-${stack} > deployed.json`

Expand Down

0 comments on commit a0a1aaa

Please sign in to comment.