test parallel deploy

This commit is contained in:
neil 2022-10-17 20:41:51 +08:00
parent ec3e15c120
commit 843396391e

View file

@ -8,9 +8,31 @@ env:
TEA_SECRET: ${{ secrets.TEA_SECRET }} TEA_SECRET: ${{ secrets.TEA_SECRET }}
jobs: jobs:
deploy: deploy_sls:
runs-on: ubuntu-latest runs-on: ubuntu-latest
defaults:
run:
working-directory: ./lambdas
steps: steps:
- 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-region: us-east-1
- uses: borales/actions-yarn@v3.0.0
with:
cmd: install
- name: deploy
working-directory: ./lambdas
uses: Teakowa/serverless-action@master
with:
args: --stage prod deploy
# deploy:
# runs-on: ubuntu-latest
# steps:
# - name: inject slug/short variables # - name: inject slug/short variables
# uses: rlespinasse/github-slug-action@v3.x # uses: rlespinasse/github-slug-action@v3.x
# - name: Set STAGE variable in environment for next steps # - name: Set STAGE variable in environment for next steps
@ -68,28 +90,17 @@ jobs:
# with: # with:
# working-directory: .cdk # working-directory: .cdk
- uses: aws-actions/configure-aws-credentials@v1 # - uses: aws-actions/configure-aws-credentials@v1
with: # with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} # aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} # aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1 # aws-region: us-east-1
# - name: Deploy to AWS # - name: Deploy to AWS
# id: cdk_deploy # id: cdk_deploy
# run: yarn deploy # run: yarn deploy
# working-directory: .cdk # working-directory: .cdk
- uses: borales/actions-yarn@v3.0.0
working-directory: ./lambdas
with:
cmd: install
- name: deploy
working-directory: ./lambdas
uses: Teakowa/serverless-action@master
with:
args: --stage prod deploy
# - name: Seal Deployment # - name: Seal Deployment
# uses: bobheadxi/deployments@v1 # uses: bobheadxi/deployments@v1
# if: always() # if: always()