-
Notifications
You must be signed in to change notification settings - Fork 2
62 lines (47 loc) · 1.3 KB
/
generate-xref-maps.yml
File metadata and controls
62 lines (47 loc) · 1.3 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
61
62
name: generate-xref-maps
on:
workflow_dispatch:
schedule:
- cron: '0 5 * * SUN'
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install DocFX
run: choco install docfx -y
- name: Restore Packages
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Checkout GitHub Pages branch
uses: actions/checkout@v4
with:
ref: gh-pages
path: UnityXRefMap/out
- name: Clean existing GitHub Pages files
run: |
cd UnityXRefMap/out
git rm -r .
- name: Run
run: |
cd UnityXRefMap
dotnet run --configuration Release --no-build
- name: Upload XRef Maps
uses: actions/upload-artifact@v4
with:
name: xrefmaps
path: UnityXRefMap/out
- name: Push to GitHub Pages
run: |
$hash = (git log -n 1 --pretty="%h").Trim()
$name = (git log -n 1 --pretty="%an").Trim()
$email = (git log -n 1 --pretty="%ae").Trim()
cd UnityXRefMap/out
echo "Committing as $name <$email>"
git config user.name $name
git config user.email $email
git add .
git commit --message "Scheduled XRef Map Update"
git push