Skip to content

update gh-pages branch #19

update gh-pages branch

update gh-pages branch #19

name: update gh-pages branch
on:
workflow_dispatch:
jobs:
build-site:
runs-on: windows-latest
steps:
- name: Checkout branch
uses: actions/checkout@v3
- name: Check status
run: git status
- name: Download docfx
run: curl https://github.com/dotnet/docfx/releases/download/v2.59.2/docfx.zip -L -o ../docfx.zip
- name: Expand docfx
run: Expand-Archive ../docfx.zip -DestinationPath ../docfx
- name: Build site with docfx
run: "../docfx/docfx.exe build docfx.json --globalMetadata \"{ '_matomoContainerUrl': 'https://matomo.devexpress.com/js/container_kE7MWPi0.js' }\" --warningsAsErrors"
- name: Archive site
run: Compress-Archive -Path _site/* -DestinationPath ${{ runner.temp }}/site.zip
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: github-pages
path: ${{ runner.temp }}/site.zip
publish-pages:
needs: build-site
runs-on: windows-latest
steps:
- name: Checkout branch
uses: actions/checkout@v3
with:
ref: gh-pages
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: github-pages
path: ../
- name: Clear directory
run: Get-ChildItem . -Recurse | Remove-Item -Force -Recurse
- name: Extract archive
run: Expand-Archive -Path ../site.zip -DestinationPath .
- name: Push changes to gh-pages
run: |
git config user.name github-actions
git config user.email [email protected]
git add .
git commit -m "Pages update"
git push