forked from biemster/FindMy
-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (41 loc) · 1.16 KB
/
build-deploy.yml
File metadata and controls
50 lines (41 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: Deploy Serverless App
on:
workflow_dispatch:
inputs:
stage:
description: 'Stage to deploy to'
required: false
default: 'prod'
jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
# Add permissions block for OIDC token
permissions:
id-token: write
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: arn:aws:iam::942778112339:role/git-deploy
aws-region: eu-central-1
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
- name: Install npm dependencies
run: npm ci
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: '3.12'
- name: Install Poetry
run: |
pip install "poetry==1.8.2"
- name: Deploy to AWS
run: ./node_modules/.bin/sls deploy --stage ${{ github.event.inputs.stage }}
env:
SERVERLESS_ACCESS_KEY: ${{ secrets.SERVERLESS_ACCESS_KEY }}