Move docs to luacs-docs/{lua,cs,landing-page}
luacs-docs/cs also has a proper http server for testing locally
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
|
||||
|
||||
name: .NET Pre-Release
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
@@ -26,7 +27,7 @@ jobs:
|
||||
run: dotnet build LinuxSolution.sln --no-restore
|
||||
- name: Test
|
||||
run: dotnet test LinuxSolution.sln --no-build --verbosity normal
|
||||
|
||||
|
||||
- name: Publish WindowsServer
|
||||
run: dotnet publish Barotrauma/BarotraumaServer/WindowsServer.csproj -c Release -clp:"ErrorsOnly;Summary" --self-contained -r win-x64 \/p:Platform="x64"
|
||||
- name: Publish WindowsClient
|
||||
@@ -42,38 +43,34 @@ jobs:
|
||||
- name: Publish MacClient
|
||||
run: dotnet publish Barotrauma/BarotraumaClient/MacClient.csproj -c Release -clp:"ErrorsOnly;Summary" --self-contained -r osx-x64 \/p:Platform="x64"
|
||||
|
||||
|
||||
- name: Archive Windows Release
|
||||
uses: thedoctor0/zip-release@main
|
||||
with:
|
||||
type: 'zip'
|
||||
filename: 'barotrauma_lua_windows.zip'
|
||||
#exclusions: '*.git* /*node_modules/* .editorconfig'
|
||||
directory: 'Barotrauma/bin/ReleaseWindows/netcoreapp3.1/win-x64/publish'
|
||||
|
||||
type: zip
|
||||
filename: barotrauma_lua_windows.zip
|
||||
directory: Barotrauma/bin/ReleaseWindows/netcoreapp3.1/win-x64/publish
|
||||
|
||||
- name: Archive Linux Release
|
||||
uses: thedoctor0/zip-release@main
|
||||
with:
|
||||
type: 'zip'
|
||||
filename: 'barotrauma_lua_linux.zip'
|
||||
#exclusions: '*.git* /*node_modules/* .editorconfig'
|
||||
directory: 'Barotrauma/bin/ReleaseLinux/netcoreapp3.1/linux-x64/publish'
|
||||
|
||||
type: zip
|
||||
filename: barotrauma_lua_linux.zip
|
||||
directory: Barotrauma/bin/ReleaseLinux/netcoreapp3.1/linux-x64/publish
|
||||
|
||||
- name: Archive Mac Release
|
||||
uses: thedoctor0/zip-release@main
|
||||
with:
|
||||
type: 'zip'
|
||||
filename: 'barotrauma_lua_mac.zip'
|
||||
#exclusions: '*.git* /*node_modules/* .editorconfig'
|
||||
directory: 'Barotrauma/bin/ReleaseMac/netcoreapp3.1/osx-x64/publish'
|
||||
|
||||
type: zip
|
||||
filename: barotrauma_lua_mac.zip
|
||||
directory: Barotrauma/bin/ReleaseMac/netcoreapp3.1/osx-x64/publish
|
||||
|
||||
- name: Automatic Release
|
||||
uses: marvinpinto/action-automatic-releases@v1.2.1
|
||||
with:
|
||||
repo_token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
automatic_release_tag: "latest"
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
automatic_release_tag: latest
|
||||
prerelease: false
|
||||
title: "Automatic Build"
|
||||
title: Automatic Build
|
||||
files: |
|
||||
Barotrauma/bin/ReleaseWindows/netcoreapp3.1/win-x64/publish/barotrauma_lua_windows.zip
|
||||
Barotrauma/bin/ReleaseLinux/netcoreapp3.1/linux-x64/publish/barotrauma_lua_linux.zip
|
||||
|
||||
@@ -1,8 +1,17 @@
|
||||
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
|
||||
|
||||
name: Update documentation
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
CI_DEPLOY_DIR: luacs-docs/ci-deploy
|
||||
CI_ARTIFACTS_DIR: luacs-docs/ci-artifacts
|
||||
DOCS_LUA_ROOT: luacs-docs/lua
|
||||
DOCS_CS_ROOT: luacs-docs/cs
|
||||
DOCS_LANDINGPAGE_ROOT: luacs-docs/landing-page
|
||||
|
||||
jobs:
|
||||
update-docs-lua:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -19,22 +28,23 @@ jobs:
|
||||
- uses: leafo/gh-actions-luarocks@v4
|
||||
|
||||
- name: Run install script
|
||||
working-directory: docs
|
||||
working-directory: ${{ env.DOCS_LUA_ROOT }}
|
||||
run: ./scripts/install.sh
|
||||
|
||||
- name: Run build script
|
||||
working-directory: docs
|
||||
working-directory: ${{ env.DOCS_LUA_ROOT }}
|
||||
run: ./scripts/build.sh
|
||||
|
||||
- name: Create tarball
|
||||
working-directory: docs/html
|
||||
run: tar -czf ../../docs-lua.tar.gz .
|
||||
run: |
|
||||
mkdir -p "$CI_ARTIFACTS_DIR"
|
||||
tar -czf "$CI_ARTIFACTS_DIR"/lua.tar.gz -C "$DOCS_LUA_ROOT"/build .
|
||||
|
||||
- name: Upload tarball
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: docs-lua
|
||||
path: docs-lua.tar.gz
|
||||
path: ${{ env.CI_ARTIFACTS_DIR }}/lua.tar.gz
|
||||
|
||||
update-docs-cs:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -42,38 +52,23 @@ jobs:
|
||||
- name: Checkout branch
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Create directories
|
||||
run: |
|
||||
mkdir -p doxygen/build/baro-server
|
||||
mkdir -p doxygen/build/baro-client
|
||||
- name: Install doxygen
|
||||
run: sudo apt-get update && sudo apt-get install -y doxygen
|
||||
|
||||
- name: Build server documentation
|
||||
uses: mattnotmitt/doxygen-action@v1
|
||||
with:
|
||||
working-directory: 'doxygen/baro-server'
|
||||
doxyfile-path: './Doxyfile'
|
||||
|
||||
- name: Build client documentation
|
||||
uses: mattnotmitt/doxygen-action@v1
|
||||
with:
|
||||
working-directory: 'doxygen/baro-client'
|
||||
doxyfile-path: './Doxyfile'
|
||||
|
||||
- name: Build containing documentation
|
||||
uses: mattnotmitt/doxygen-action@v1
|
||||
with:
|
||||
working-directory: 'doxygen/'
|
||||
doxyfile-path: './Doxyfile'
|
||||
- name: Run build script
|
||||
working-directory: ${{ env.DOCS_CS_ROOT }}
|
||||
run: ./scripts/build.sh
|
||||
|
||||
- name: Create tarball
|
||||
working-directory: doxygen/build
|
||||
run: tar -czf ../../docs-cs.tar.gz .
|
||||
run: |
|
||||
mkdir -p "$CI_ARTIFACTS_DIR"
|
||||
tar -czf "$CI_ARTIFACTS_DIR"/cs.tar.gz -C "$DOCS_CS_ROOT"/build .
|
||||
|
||||
- name: Upload tarball
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: docs-cs
|
||||
path: docs-cs.tar.gz
|
||||
path: ${{ env.CI_ARTIFACTS_DIR }}/cs.tar.gz
|
||||
|
||||
deploy-docs:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -82,33 +77,32 @@ jobs:
|
||||
- name: Checkout branch
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- run: mkdir -p docs_deploy
|
||||
- run: mkdir -p "$CI_ARTIFACTS_DIR" "$CI_DEPLOY_DIR"
|
||||
|
||||
- name: "Download build artifacts: lua docs"
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: docs-lua
|
||||
path: docs_deploy
|
||||
path: ${{ env.CI_ARTIFACTS_DIR }}
|
||||
|
||||
- name: "Download build artifacts: cs docs"
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: docs-cs
|
||||
path: docs_deploy
|
||||
|
||||
- name: Copy landing page files
|
||||
run: cp -r docs-landing-page/. docs_deploy/public
|
||||
path: ${{ env.CI_ARTIFACTS_DIR }}
|
||||
|
||||
- name: Extract lua and cs tarballs
|
||||
working-directory: docs_deploy
|
||||
run: |
|
||||
mkdir -p public/lua-docs public/cs-docs
|
||||
tar -xzf docs-lua.tar.gz -C public/lua-docs
|
||||
tar -xzf docs-cs.tar.gz -C public/cs-docs
|
||||
mkdir -p "$CI_DEPLOY_DIR"/{lua,cs}-docs
|
||||
tar -xzf "$CI_ARTIFACTS_DIR"/lua.tar.gz -C "$CI_DEPLOY_DIR"/lua-docs
|
||||
tar -xzf "$CI_ARTIFACTS_DIR"/cs.tar.gz -C "$CI_DEPLOY_DIR"/cs-docs
|
||||
|
||||
- name: Copy landing page files
|
||||
run: cp -r "$DOCS_LANDINGPAGE_ROOT"/. "$CI_DEPLOY_DIR"
|
||||
|
||||
- name: Deploy
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
publish_dir: docs_deploy/public
|
||||
publish_dir: ${{ env.CI_DEPLOY_DIR }}
|
||||
keep_files: true
|
||||
|
||||
Reference in New Issue
Block a user