-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (53 loc) · 1.57 KB
/
build-and-test.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
name: Build and Test
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
name: Build
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v3
- run: corepack enable
- uses: actions/setup-node@v3
with:
node-version: 20
cache: pnpm
- uses: actions/setup-dotnet@v4
with:
dotnet-version: "8.x"
- run: pnpm i
- name: Build server
run: pnpm server:build
- name: Run Integration Tests
run: pnpm test:integration
- name: Lint client
run: pnpm lint
working-directory: ./src/client
- name: Build client
run: pnpm client:build
- name: Build docker
run: pnpm docker:build
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
if: github.ref == 'refs/heads/main'
- name: Push docker
id: push_docker
run: pnpm docker:push
if: github.ref == 'refs/heads/main'
- name: Deploy to Azure Web App
id: deploy-to-webapp
uses: azure/webapps-deploy@v2
with:
app-name: "Minigolffreitag"
slot-name: "production"
publish-profile: ${{ secrets.AzureAppService_PublishProfile_4d5a9096408d4948a5453808899f123a }}
images: "masch0212/minigolf-friday:${{ steps.push_docker.outputs.docker_tag }}"
if: github.ref == 'refs/heads/main'