mirror of
https://github.com/nsnail/spectre.console.git
synced 2025-04-13 15:42:50 +08:00
51 lines
1016 B
YAML
51 lines
1016 B
YAML
name: Deploy Documentation
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
paths:
|
|
- 'docs/**'
|
|
- 'src/**'
|
|
|
|
jobs:
|
|
|
|
###################################################
|
|
# DOCS
|
|
###################################################
|
|
|
|
build:
|
|
name: Deploy
|
|
runs-on: windows-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Setup dotnet
|
|
uses: actions/setup-dotnet@v1
|
|
with:
|
|
dotnet-version: 5.0.202
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v2
|
|
with:
|
|
node-version: '14'
|
|
|
|
- name: Cache dependencies
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: ~/.npm
|
|
key: npm-${{ hashFiles('package-lock.json') }}
|
|
restore-keys: npm-
|
|
|
|
- name: Publish
|
|
shell: bash
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
run: |
|
|
cd docs
|
|
npm i
|
|
dotnet run --configuration Release
|
|
npm run build
|
|
dotnet run -- deploy
|