generated from Caknoooo/go-gin-clean-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (29 loc) · 994 Bytes
/
azure_prod.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
name: Build Go app and push to Azure (Production)
on:
push:
branches: [ main ]
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.18
- name: Set up Env
run: echo "${{ secrets.ENV_PRODUCTION }}" > build/.env
- name: Copy migration files
run: xcopy /e /k /h /i migrations build\migrations
- name: Copy template files
run: xcopy /e /k /h /i utils\template build\utils\template
- name: Build
run: go build -o build/go-app.exe -v
- name: Deploy to Azure
uses: Azure/webapps-deploy@v2
with:
# Name of the Azure Web App
app-name: tedxits-server
# Applies to Web App only: Path to package or folder. *.zip, *.war, *.jar or a folder to deploy
package: build/
publish-profile: ${{ secrets.AZUREWEBAPPPUBLISHPROFILE_PRODUCTION }}