Repository navigation
60 lines (59 loc) · 2.03 KB
/
Copy pathinglemoorccc.yml
File metadata and controls
60 lines (59 loc) · 2.03 KB
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
name: Build and deploy .NET Core application to Web App inglemoorccc
on:
push:
branches:
- main
pull_request:
branches:
- main
env:
AZURE_WEBAPP_NAME: inglemoorccc
AZURE_WEBAPP_PACKAGE_PATH: InglemoorCodingComputing/publish
CONFIGURATION: Release
DOTNET_CORE_VERSION: 7.0.x
WORKING_DIRECTORY: src/InglemoorCodingComputing
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.DOTNET_CORE_VERSION }}
- name: Setup node.js
uses: actions/setup-node@v3
with:
node-version: 16
- name: Setup tailwind
run: |
npm install -D tailwindcss
npm install -D @tailwindcss/typography
- name: Tailwindcss
run: npx tailwindcss -c "${{ env.WORKING_DIRECTORY }}/tailwind.config.js" -i "${{ env.WORKING_DIRECTORY }}/Styles/app.css" -o "${{ env.WORKING_DIRECTORY }}/wwwroot/tailwind.css" --minify
- name: Restore
run: dotnet restore "${{ env.WORKING_DIRECTORY }}"
- name: Build
run: dotnet build "${{ env.WORKING_DIRECTORY }}" --configuration ${{ env.CONFIGURATION }} --no-restore
- name: Test
run: dotnet test "${{ env.WORKING_DIRECTORY }}" --no-build
- name: Publish
run: dotnet publish "${{ env.WORKING_DIRECTORY }}" --configuration ${{ env.CONFIGURATION }} --no-build --output "${{ env.AZURE_WEBAPP_PACKAGE_PATH }}"
- name: Compress package
if: ${{ github.event_name == 'push' }}
run: dotnet fsi scripts/deploy.fsx
- name: Deploy to production
if: ${{ github.event_name == 'push' }}
uses: appleboy/scp-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
password: ${{ secrets.KEY }}
port: ${{ secrets.PORT }}
source: "package.zip"
target: "../../var/app/"
- name: Publish Artifacts
uses: actions/upload-artifact@v1.0.0
with:
name: webapp
path: ${{ env.AZURE_WEBAPP_PACKAGE_PATH }}