From a31b1afdf7f0313b80346479a5a385f44a3cc641 Mon Sep 17 00:00:00 2001 From: Eugenio Sales Date: Sun, 16 Oct 2022 21:14:48 -0300 Subject: [PATCH] feature #1 - add serverless deploy CD --- .github/workflows/serverless-deploy.yml | 28 +++++++++++++++++++++++++ package.json | 3 ++- 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/serverless-deploy.yml diff --git a/.github/workflows/serverless-deploy.yml b/.github/workflows/serverless-deploy.yml new file mode 100644 index 0000000..e454d9d --- /dev/null +++ b/.github/workflows/serverless-deploy.yml @@ -0,0 +1,28 @@ +name: serverless-deploy + +on: + push: + branches: + - master + +jobs: + deploy: + name: deploy + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [14.x] + steps: + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - run: npm ci + - name: serverless deploy + uses: serverless/github-action@master + with: + args: deploy --stage devel + env: + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} \ No newline at end of file diff --git a/package.json b/package.json index ae52924..3894b68 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,8 @@ "lint-fix": "tslint --fix src/**/*.ts test/**/*.ts -t verbose", "test": "jest", "typecheck": "tsc --noEmit", - "deploy": "clear && sls deploy --verbose" + "deploy": "clear && sls deploy --verbose", + "ci": "yarn typecheck && yarn lint && yarn test" }, "devDependencies": { "@commitlint/cli": "^11.0.0",