-
Notifications
You must be signed in to change notification settings - Fork 1
69 lines (56 loc) · 1.96 KB
/
build-and-deploy.yaml
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
67
68
69
name: build-and-deploy
on:
push:
branches:
- main
schedule:
- cron: '0 9 * * *' # daily at 09:00 - approximately some time after Geofabrik's OSM daily dump becomes available
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: browser-actions/setup-chrome@v1
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: cache/
key: osmalyzer-cache-${{ github.run_id }}
# restore nearest cache - i.e. previous cache
restore-keys: |
osmalyzer-cache
- uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
## One-step
#- run: dotnet run --project Osmalyzer --configuration Release --property:ExtraDefineConstants=REMOTE_EXECUTION
# Multiple steps
- run: dotnet restore
- run: dotnet build --configuration Release --no-restore --property:ExtraDefineConstants=REMOTE_EXECUTION
- run: dotnet run --project Osmalyzer --configuration Release --no-build
## Profile
#- run: dotnet restore
#- run: dotnet tool install --global dotnet-trace
#- run: dotnet build --configuration Release --no-restore --property:ExtraDefineConstants=REMOTE_EXECUTION
#- run: |
# export PATH="$PATH:$HOME/.dotnet/tools"
# dotnet run --project Osmalyzer --configuration Release --no-build & sleep 3
# dotnet-trace collect --name Osmalyzer --output ./whyareyouslow.nettrace
#- uses: actions/upload-artifact@v2
# with:
# path: ./whyareyouslow.nettrace
- uses: actions/upload-pages-artifact@v1
with:
path: output/
# Upload artifact (i.e. generated static website) to GitHub Pages
deploy:
needs: build
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
permissions:
pages: write
id-token: write
actions: read
runs-on: ubuntu-latest
steps:
- uses: actions/deploy-pages@v1