-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (43 loc) · 1.22 KB
/
main.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
name: Deploy Project to App Engine
env:
CI: false
on:
push:
branches:
- main
# run the workflow manually from the Actions tab
workflow_dispatch:
jobs:
sonarcloud:
name: SonarCloud
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: SonarCloud Scan
uses: SonarSource/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
deploy:
name: Deploying to Google Cloud
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: "18.x"
- run: npm install
- run: npm run build
- name: Deploy to App Engine
id: deploy
uses: google-github-actions/[email protected]
with:
deliverables: app.yaml
version: v1
credentials: ${{ secrets.GCP_SERVICE_CREDENTIALS }}
- name: Test
run: curl "${{ steps.deploy.outputs.url }}"