Skip to content

Attempt to fix publishing #51

Attempt to fix publishing

Attempt to fix publishing #51

Workflow file for this run

name: Publish Documentation
on:
push:
tags:
- update-*
env:
GIT_CLONE_PROTECTION_ACTIVE: false
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: false
jobs:
build:
runs-on: ubuntu-22.04
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Checkout live docs repo
uses: actions/checkout@v3
with:
repository: FlaxEngine/FlaxDocsHost
path: _site
fetch-depth: 1
persist-credentials: false
- name: Clear live docs repo
run: rm -rf _site/*
- name: Get mono
run: |
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
sudo sh -c 'echo "deb https://download.mono-project.com/repo/ubuntu stable-bionic main" > /etc/apt/sources.list.d/mono-official-stable.list'
sudo apt-get update
sudo apt-get install mono-complete --yes
- name: Get .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
- name: Print .NET info
run: |
dotnet --info
dotnet workload --info
- name: Build docs
run: |
git lfs version
git clone https://github.com/FlaxEngine/FlaxEngine.git FlaxEngine
cd FlaxEngine
git reset --hard $(cat ../commit.txt)
git lfs pull
./Development/Scripts/Linux/CallBuildTool.sh -log -arch=x64 -configuration=Development -platform=Windows -buildtargets=FlaxEditor -build -BuildBindingsOnly
cd ..
mono docfx/docfx.exe metadata
mono code2yaml/code2yaml.exe code2yaml.json
mono docfx/docfx.exe build
cp favicon.ico _site/favicon.ico
cp logo.svg _site/logo.svg
cp logo.png _site/logo.png
cp CNAME _site/CNAME
- name: Commit
run: |
export GIT_COMMITTER_NAME=$(git show -s --format='%cn')
export GIT_COMMITTER_EMAIL=$(git show -s --format='%ce')
export GIT_AUTHOR_NAME=$(git show -s --format='%an')
export GIT_AUTHOR_EMAIL=$(git show -s --format='%ae')
export COMMIT_HASH=$(git show -s --format='%H')
export SUBJECT=$(git show -s --format='%s')
cd _site
git add .
git commit -m "$SUBJECT" -m "Original commit: $COMMIT_HASH"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.API_TOKEN_GITHUB }}
branch: master
directory: _site
repository: FlaxEngine/FlaxDocsHost
force: true