Skip to content

Wiki - generate unit pages #2

Wiki - generate unit pages

Wiki - generate unit pages #2

name: FAF Wiki Generator for Blueprints
on:
workflow_dispatch:
jobs:
generate-blueprints:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
# Checkout repos, FA repo is sparse checkout as it is quite large
- name: Checkout Brewlan Wikigen Repository
uses: actions/checkout@v4
with:
repository: The-Balthazar/BrewWikiGen
ref: master
path: ./brew-wiki-gen
# FA repo is sparse checkout as it is quite large and we dont won't to incur higher action minutes for no reason
- name: Checkout FAF Repository # -png folder doesnt exist yet, confirm location.
uses: actions/checkout@v4
with:
repository: FAForever/fa
ref: deploy/develop
path: ./fa
sparse-checkout-cone-mode: |
wiki
loc
lua/ui/help/unitscription.lua
lua/ui/help/tooltips.lua
lua/sim/AdjacencyBuffs.lua
lua/system/Blueprints.lua
units/*_unit.bp
units/*_LOD0.scm
projectiles
- name: Checkout FAF Wiki Repository
uses: actions/checkout@v4
with:
repository: FAForever/fa.wiki
ref: master
path: ./fa.wiki
- name: Install Lua 5.4
uses: leafo/gh-actions-lua@v10
with:
luaVersion: "5.4"
- name: Replace run.lua
run: |
sudo mv fa/wiki/Run.lua brew-wiki-gen/Run.lua
- name: Execute lua run
run: |
lua brew-wiki-gen/Run.lua --OutputDirectory="fa.wiki/" --WikiGeneratorDirectory="brew-wiki-gen/" --FADirectory="fa/"
- name: Upload as artifact
uses: actions/upload-artifact@v4
with:
name: Wiki
path: fa.wiki
#- name: Store the game version
# id: gameVersionJSON # but it is a string here!
# working-directory: app/data
# run: |
# json=`cat ./version.json`
# echo "json=$json" >> $GITHUB_OUTPUT
#- name: Update Wiki repository # but it is a string here!
# working-directory: fa.wiki
# run: |
# git config user.email "administrator@faforever.com"
# git config user.name "FAForever"
# git stage .
# git commit -m "Update generated data to game version ${{ fromJson(steps.gameVersionJSON.outputs.json).version}}"
# git push origin HEAD:master