-
Notifications
You must be signed in to change notification settings - Fork 24
58 lines (47 loc) · 1.53 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:
tags:
- v*
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: "read"
id-token: "write"
steps:
# Setup
- uses: actions/checkout@v4
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3)
- uses: actions/setup-node@v4
with:
cache: "npm"
- id: "auth"
uses: "google-github-actions/auth@v2"
with:
workload_identity_provider: "projects/449204913966/locations/global/workloadIdentityPools/github/providers/github"
service_account: "[email protected]"
# Build/Deploy
- run: |
npm install --force
npm run build
cp .appengine/app.yaml public/
- id: "deploy"
name: "Deploy to App Engine"
uses: "google-github-actions/deploy-appengine@v2"
with:
deliverables: "public/app.yaml"
promote: true
version: ${{ steps.get_version.outputs.VERSION }}
- name: Slack Notification
uses: rtCamp/action-slack-notify@v2
if: always()
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_COLOR: ${{ job.status }}
SLACK_TITLE: Déploiement réussi
SLACK_MESSAGE: Version ${{ steps.get_version.outputs.VERSION }} "${{ steps.deploy.outputs.url }}"
SLACK_ICON: https://github.com/fluidicon.png
SLACK_USERNAME: Github Actions