-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (39 loc) · 1.4 KB
/
deploy-lambda.yaml
File metadata and controls
50 lines (39 loc) · 1.4 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 Lambda
on:
push:
tags:
- '**'
workflow_dispatch:
jobs:
deploy-lambda:
runs-on: ubuntu-latest
timeout-minutes: 15
concurrency: deploy-prod # Avoid deploying concurrently
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.4'
coverage: none
# Install the Bref CLI as a global tool
tools: bref/cli
- name: Install composer dependencies
uses: php-actions/composer@v6
with:
interaction: no
dev: no
php_version: "8.4"
version: 2
args: --optimize-autoloader --no-scripts --ignore-platform-reqs
- name: Add Bref Cloud team
run: |
echo "bref:" >> serverless.yml
echo " team: babeuloula" >> serverless.yml
- name: Inject tag version into .env
if: github.ref_type == 'tag'
run: sed -i "s/APP_VERSION=/APP_VERSION=${{ github.ref_name }}/" .env
- run: bref deploy --env=prod
env:
BREF_TOKEN: ${{ secrets.BREF_TOKEN }}