Skip to content

Commit 9b5cb8b

Browse files
committed
feat: use dotenv plugin
1 parent 30dee76 commit 9b5cb8b

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

.github/workflows/deploy.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ jobs:
2828

2929
- name: Lint code
3030
run: yarn lint
31-
31+
3232
- name: Build project
3333
run: yarn build
34-
34+
3535
- name: Upload build artifact
3636
uses: actions/upload-artifact@v4
3737
with:
@@ -45,7 +45,7 @@ jobs:
4545
prisma/
4646
src/
4747
retention-days: 1
48-
48+
4949
deploy:
5050
name: Deploy to AWS Lambda
5151
needs: validate
@@ -55,10 +55,10 @@ jobs:
5555
uses: actions/download-artifact@v4
5656
with:
5757
name: build-artifact
58-
58+
5959
- name: Install Serverless Framework
6060
run: npm install -g serverless@3.38.0
61-
61+
6262
- name: Install Prisma CLI
6363
run: npm install -g prisma
6464

@@ -67,14 +67,14 @@ jobs:
6767
env:
6868
DB_URL: ${{ secrets.DB_URL }}
6969

70+
- name: Create .env file
71+
run: |
72+
echo "ACCESS_TOKEN_SECRET=${{ secrets.ACCESS_TOKEN_SECRET }}" >> .env
73+
echo "REFRESH_TOKEN_SECRET=${{ secrets.REFRESH_TOKEN_SECRET }}" >> .env
74+
echo "DB_URL=${{ secrets.DB_URL }}" >> .env
75+
7076
- name: Configure serverless credentials
7177
run: serverless config credentials --provider aws --key ${{ secrets.AWS_ACCESS_KEY_ID }} --secret ${{ secrets.AWS_SECRET_ACCESS_KEY }}
72-
78+
7379
- name: Deploy serverless app
74-
env:
75-
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
76-
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
77-
ACCESS_TOKEN_SECRET: ${{ secrets.ACCESS_TOKEN_SECRET }}
78-
REFRESH_TOKEN_SECRET: ${{ secrets.REFRESH_TOKEN_SECRET }}
79-
DB_URL: ${{ secrets.DB_URL }}
8080
run: npx serverless deploy 2>&1 | grep -v 'endpoint:'

serverless.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
service: nest-graphql-mercurius-fastify
55

66
plugins:
7-
# - serverless-dotenv-plugin
7+
- serverless-dotenv-plugin
88

99
provider:
1010
name: aws

0 commit comments

Comments
 (0)