Skip to content

Commit

Permalink
Create docfx.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
sk-zk authored Feb 9, 2024
1 parent e6aa15e commit 3dddd12
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/docfx.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Publish documentation

on:
push:
branches:
- main
- docfx-action

jobs:
publish-docs:
name: Publish documentation
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Dotnet Setup
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x

- name: Update docfx
run: dotnet tool update -g docfx

- name: Build documentation
run: docfx docfx/docfx.json

- name: Publish to GitHub Pages
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub Action"
git clone https://${{ secrets.PERSONAL_TOKEN }}@github.com/sk-zk/sk-zk.github.io.git
cd sk-zk.github.io
rm -rf trucklib
mkdir -p trucklib/master
cp -r ../docfx/_site/* trucklib/master
git add .
git diff-index --quiet HEAD || git commit -m "Update TruckLib documentation"
git push

0 comments on commit 3dddd12

Please sign in to comment.