Skip to content

generate-xref-maps #142

generate-xref-maps

generate-xref-maps #142

name: generate-xref-maps
on:
workflow_dispatch:
schedule:
- cron: '0 5 * * SUN'
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.x
- 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@v2
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/[email protected]
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