Bumps [actions/setup-dotnet](https://github.com/actions/setup-dotnet) from 4.0.0 to 4.0.1.
- [Release notes](https://github.com/actions/setup-dotnet/releases)
- [Commits](4d6c8fcf3c...6bd8b7f777)
---
updated-dependencies:
- dependency-name: actions/setup-dotnet
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
119 lines
3.7 KiB
YAML
119 lines
3.7 KiB
YAML
# 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
|
|
steps:
|
|
- name: Checkout branch
|
|
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
|
|
with:
|
|
submodules: recursive
|
|
|
|
- name: Setup .NET
|
|
uses: actions/setup-dotnet@6bd8b7f7774af54e05809fcc5431931b3eb1ddee # v4.0.1
|
|
with:
|
|
dotnet-version: |
|
|
6.0.x
|
|
|
|
- uses: leafo/gh-actions-lua@35bcb06abec04ec87df82e08caa84d545348536e # v10.0.0
|
|
with:
|
|
luaVersion: "5.2"
|
|
|
|
- uses: leafo/gh-actions-luarocks@e65774a6386cb4f24e293dca7fc4ff89165b64c5 # v4.3.0
|
|
|
|
- name: Run install script
|
|
working-directory: ${{ env.DOCS_LUA_ROOT }}
|
|
run: ./scripts/install.sh
|
|
|
|
- name: Run docs generator script
|
|
working-directory: ${{ env.DOCS_LUA_ROOT }}
|
|
run: ./scripts/generate_docs.sh
|
|
|
|
- name: Run build script
|
|
working-directory: ${{ env.DOCS_LUA_ROOT }}
|
|
run: ./scripts/build.sh
|
|
|
|
- name: Create tarball
|
|
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@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
|
|
with:
|
|
name: docs-lua
|
|
path: ${{ env.CI_ARTIFACTS_DIR }}/lua.tar.gz
|
|
|
|
update-docs-cs:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout branch
|
|
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
|
|
|
|
- name: Install doxygen
|
|
run: sudo apt-get update && sudo apt-get install -y doxygen
|
|
|
|
- name: Run build script
|
|
working-directory: ${{ env.DOCS_CS_ROOT }}
|
|
run: ./scripts/build.sh
|
|
|
|
- name: Create tarball
|
|
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@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
|
|
with:
|
|
name: docs-cs
|
|
path: ${{ env.CI_ARTIFACTS_DIR }}/cs.tar.gz
|
|
|
|
deploy-docs:
|
|
runs-on: ubuntu-latest
|
|
needs: [update-docs-lua, update-docs-cs]
|
|
steps:
|
|
- name: Checkout branch
|
|
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
|
|
|
|
- run: mkdir -p "$CI_ARTIFACTS_DIR" "$CI_DEPLOY_DIR"
|
|
|
|
- name: "Download build artifacts: lua docs"
|
|
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
|
|
with:
|
|
name: docs-lua
|
|
path: ${{ env.CI_ARTIFACTS_DIR }}
|
|
|
|
- name: "Download build artifacts: cs docs"
|
|
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
|
|
with:
|
|
name: docs-cs
|
|
path: ${{ env.CI_ARTIFACTS_DIR }}
|
|
|
|
- name: Extract lua and cs tarballs
|
|
run: |
|
|
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@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e #v4.0.0
|
|
with:
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
publish_dir: ${{ env.CI_DEPLOY_DIR }}
|
|
keep_files: true
|