-
Notifications
You must be signed in to change notification settings - Fork 2
57 lines (55 loc) · 1.52 KB
/
deploy.yml
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
51
52
53
54
55
56
57
name: Deploy
on:
push:
branches:
- develop
jobs:
deploy:
name: deploy
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
env:
NODE_ENV: production
- name: NPM install
run: npm ci
- name: Build assets
run: npm run build
- uses: shivammathur/setup-php@v2
with:
php-version: "8.2"
- uses: "ramsey/composer-install@v2"
with:
composer-options: "--prefer-dist --optimize-autoloader --no-dev"
env:
APP_ENV: prod
- name: Create database
run: php bin/console doctrine:database:create
env:
APP_ENV: prod
- name: Execute migrations
run: php bin/console doctrine:migrations:migrate --no-interaction
env:
APP_ENV: prod
- name: Generate split images
run: php bin/console app:split-image images/captcha/wally-1.png
env:
APP_ENV: prod
- name: Warmup cache for performances
run: php bin/console cache:warmup --env=prod
- name: Deploy
uses: serverless/github-action@master
with:
args: deploy
env:
#SERVERLESS_ACCESS_KEY: ${{ secrets.SERVERLESS_ACCESS_KEY }}
# or if using AWS credentials directly
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}