-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (50 loc) · 1.48 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
58
59
60
61
62
63
64
65
66
name: Deploy to Google App Engine
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Replace secrets in Googles App Engine Deployment File
uses: 73h/[email protected]
env:
APP_KEY: ${{ secrets.APP_KEY }}
with:
app_yaml_path: "app.yaml"
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
tools: composer:v2
- name: Install Composer dependencies
run: composer install --no-interaction --prefer-dist --optimize-autoloader
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '16'
- name: Install NPM dependencies
run: npm ci
- name: Copy .env
run: php -r "file_exists('.env') || copy('.env.example', '.env');"
- name: Generate key
run: php artisan key:generate
- name: Clear Caches
run: php artisan cache:clear && php artisan cache:clear
- name: Tests
run: ./vendor/bin/pest
- id: 'auth'
uses: 'google-github-actions/auth@v1'
with:
credentials_json: ${{ secrets.GCP_SA_KEY }}
- id: 'deploy'
uses: 'google-github-actions/deploy-appengine@v1'
with:
project_id: ${{ secrets.GCP_PROJECT_ID }}
deliverables: app.yaml
# Example of using the output
- id: 'test'
run: 'curl "${{ steps.deploy.outputs.url }}"'