-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (43 loc) · 1.31 KB
/
build.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
name: Build
on:
push:
branches: [ "master" ]
jobs:
build:
runs-on: windows-latest
env:
DOTNET_INSTALL_DIR: '.\.dotnet'
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Cache dotnet
id: cache-dotnet
uses: actions/cache@v3
with:
path: ${{ env.DOTNET_INSTALL_DIR }}
key: ${{ runner.os }}-dotnet-8
restore-keys: ${{ runner.os }}-dotnet-8
- name: Setup dotnet
if: ${{ steps.cache-dotnet.outputs.cache-hit != 'true' }}
uses: actions/setup-dotnet@v2
with:
dotnet-version: 8.0.x
- name: Setup dotnet-script
run: ${{ env.DOTNET_INSTALL_DIR }}\dotnet tool install -g dotnet-script
- name: Setup node
uses: actions/setup-node@v2
- name: Setup torchlight
run: npm i @torchlight-api/torchlight-cli
- name: Set dotnet path
run: echo "${{ env.DOTNET_INSTALL_DIR }}" | Out-File -FilePath $ENV:GITHUB_PATH -Encoding utf8 -Append
- name: Build
run: ${{ env.DOTNET_INSTALL_DIR }}\dotnet script build.csx
- name: Highlight
env:
TORCHLIGHT_TOKEN: ${{ secrets.TORCHLIGHT_TOKEN }}
run: npx torchlight
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./output