-
-
Notifications
You must be signed in to change notification settings - Fork 0
81 lines (70 loc) · 2.25 KB
/
dotnet.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: .NET
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
#- name: Test
# run: dotnet test --no-build --verbosity normal
#################################
# 👉 PREPARE wwwroot FOLDER 👈 #
#################################
- name: Script
run: |
set-location ReactWithDotNet.WebSite/wwwroot/
npm install
npm run-script build
Remove-Item 'react-with-dotnet' -Recurse
Remove-Item 'package.json'
Remove-Item 'package-lock.json'
Remove-Item 'index.jsx'
shell: pwsh
##################
# 👉 PUBLISH 👈 #
##################
- uses: EasyDesk/action-dotnet-publish@v1
with:
# (Optional) The path to the project that should be published.
# If not specified, defaults to '.'.
path: 'ReactWithDotNet.WebSite/'
# (Optional) Additional command line arguments to be passed to 'dotnet test'.
# If not specified, defaults to 'packages'.
output-dir: 'FinalWebApp'
# (Optional) The build configuration.
# If not specified, defaults to 'Release'.
#build-configuration: Release
# (Optional) Whether to skip the build using the '--no-build' flag.
# If not specified, defaults to true.
skip-build: false
##############################
# 👉 REMOVE UNUSED FILES 👈 #
##############################
- name: Script
run: |
Remove-Item 'FinalWebApp/*.pdb'
Remove-Item 'FinalWebApp/*.xml'
shell: pwsh
# ############################
# # 👉 DEPLOY REMOTE FTP 👈 #
# ############################
#- name: 📂 Sync files
# uses: SamKirkland/[email protected]
# with:
# server: win5173.site4now.net
# username: ${{ secrets.FTP_USER_NAME }}
# password: ${{ secrets.FTP_PASSWORD }}
# local-dir: FinalWebApp/
# server-dir: submission/