Skip to content

Commit ed6ddb7

Browse files
authored
feat: use Bref Cloud (#21)
1 parent db38ab2 commit ed6ddb7

File tree

1 file changed

+17
-22
lines changed

1 file changed

+17
-22
lines changed

.github/workflows/deploy-lambda.yaml

Lines changed: 17 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -5,33 +5,27 @@ on:
55
tags:
66
- '**'
77

8-
# Allows you to run this workflow manually from the Actions tab
98
workflow_dispatch:
109

11-
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
12-
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
13-
concurrency:
14-
group: "deploy-lambda"
15-
cancel-in-progress: false
16-
17-
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
18-
permissions:
19-
contents: write
20-
2110
jobs:
2211
deploy-lambda:
2312
runs-on: ubuntu-latest
2413

14+
timeout-minutes: 15
15+
16+
concurrency: deploy-prod # Avoid deploying concurrently
17+
2518
steps:
2619
- name: Checkout
2720
uses: actions/checkout@v4
2821

29-
- name: Cache composer dependencies
30-
uses: actions/cache@v4
22+
- name: Setup PHP
23+
uses: shivammathur/setup-php@v2
3124
with:
32-
key: composer-release-${{ hashFiles('composer.json') }}-${{ hashFiles('composer.lock') }}
33-
restore-keys: composer-release
34-
path: vendor
25+
php-version: '8.3'
26+
coverage: none
27+
# Install the Bref CLI as a global tool
28+
tools: bref/cli
3529

3630
- name: Install composer dependencies
3731
uses: php-actions/composer@v6
@@ -42,10 +36,11 @@ jobs:
4236
version: 2
4337
args: --optimize-autoloader --no-scripts --ignore-platform-reqs
4438

45-
- name: Deploy with Serverless
46-
uses: serverless/[email protected]
47-
with:
48-
args: deploy --stage=prod --force
39+
- name: Add Bref Cloud team
40+
run: |
41+
echo "bref:" >> serverless.yml
42+
echo " team: babeuloula" >> serverless.yml
43+
44+
- run: bref deploy --env=prod
4945
env:
50-
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
51-
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
46+
BREF_TOKEN: ${{ secrets.BREF_TOKEN }}

0 commit comments

Comments
 (0)