-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move serverless deployment files into subfolder (#6)
* Set logging level from environment variable * Serverless ignore package patterns * Fix variables inconsistency * Set deployment bucket as environment variable * Limit maximum number of serverless deployments * Update sls workflows * Move serverless deployment files into subfolder --------- Co-authored-by: Albert Ribas <[email protected]>
- Loading branch information
1 parent
a2d7ce7
commit b03fd8d
Showing
7 changed files
with
16 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,21 +6,26 @@ on: | |
- main | ||
|
||
jobs: | ||
sls-deploy-prod: | ||
name: Serverless Deploy Prod | ||
sls-deploy: | ||
name: Serverless Deploy | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: ${{ github.workspace }}/serverless/ | ||
strategy: | ||
matrix: | ||
node-version: [18.x] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: create-json | ||
- name: Create JSON | ||
id: create-json | ||
uses: jsdaniell/[email protected] | ||
with: | ||
name: "service-account-credentials.json" | ||
json: ${{ secrets.SERVICE_ACCOUNT_CREDENTIALS }} | ||
- run: | | ||
dir: "serverless/" | ||
- name: Deploy created JSON | ||
run: | | ||
git config --global user.email "${GITHUB_ACTOR_ID}+${GITHUB_ACTOR}@users.noreply.github.com" | ||
git config --global user.name "${GITHUB_ACTOR}" | ||
git add . | ||
|
@@ -36,12 +41,13 @@ jobs: | |
- name: serverless install plugins | ||
uses: serverless/[email protected] | ||
with: | ||
args: -c "serverless plugin install --name serverless-python-requirements" | ||
args: -c "cd ./serverless && serverless plugin install --name serverless-python-requirements" | ||
entrypoint: /bin/sh | ||
- name: serverless deploy | ||
uses: serverless/[email protected] | ||
with: | ||
args: deploy --stage ${{ env.CI_ENV }} | ||
args: -c "cd ./serverless && serverless deploy --stage ${{ env.CI_ENV }} --verbose" | ||
entrypoint: /bin/sh | ||
env: | ||
CI_ENV: prod | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,8 +3,8 @@ name: Serverless Remove | |
on: workflow_dispatch | ||
|
||
jobs: | ||
sls-remove-prod: | ||
name: Serverless Remove Prod | ||
sls-remove: | ||
name: Serverless Remove | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
|
@@ -25,7 +25,8 @@ jobs: | |
- name: serverless remove | ||
uses: serverless/[email protected] | ||
with: | ||
args: remove --stage ${{ env.CI_ENV }} | ||
args: -c "cd ./serverless && serverless remove --stage ${{ env.CI_ENV }} --verbose" | ||
entrypoint: /bin/sh | ||
env: | ||
CI_ENV: prod | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
|
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.