Skip to content

Commit

Permalink
Production Deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
jzongker committed Jul 1, 2024
1 parent 82223d3 commit b0818a7
Showing 1 changed file with 28 additions and 8 deletions.
36 changes: 28 additions & 8 deletions .github/workflows/deploy-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,13 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2

- uses: actions/setup-node@v2
with:
submodules: 'true'
node-version: '18'

- uses: actions/cache@v2
- name: Cache npm dependencies
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
Expand All @@ -29,15 +32,32 @@ jobs:
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-access-key-id: ${{ secrets.STAGING_AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.STAGING_AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-2

- name: Setup Serverless
- name: Install dependencies
run: |
npm ci
- name: Check Serverless version
run: npx serverless --version

- name: Prepare Lambda Layer
run: |
export SERVERLESS_ACCESS_KEY="$AWS_ACCESS_KEY_ID"
mkdir -p layer/nodejs
cp package.json layer/nodejs/
cd layer/nodejs
npm install --production
cd ../..
- name: Deploy API
run: |
npm install
npm run deploy-prod
npm run build
npm run copy-assets
npx serverless deploy --stage Prod --verbose --force
- name: Serverless package contents
run: |
npx serverless package --stage Prod
ls -R .serverless

0 comments on commit b0818a7

Please sign in to comment.