forked from FAForever/fa
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a Github workflow to generate the content of a wiki (FAForever#6188)
- Loading branch information
Showing
7 changed files
with
202 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
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 "[email protected]" | ||
# 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 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
name: FAF Wiki Generator for icons | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
|
||
generate-icons: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
shell: bash | ||
|
||
steps: | ||
# Checkout repos | ||
|
||
# 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: | | ||
wiki | ||
textures/ui/common/game/strategicicons | ||
textures/ui/common/icons/units | ||
- name: Checkout FAF Wiki Repository | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: FAForever/fa.wiki | ||
ref: master | ||
path: ./fa.wiki | ||
|
||
- name: Install Image Magick | ||
run: | | ||
sudo apt-get install -y imagemagick | ||
# copy strategic and unit icons and convert them to PNGs. Assume this should be going to the wiki location not the fa repo | ||
- name: Convert Strategic Icons | ||
working-directory: fa | ||
run: | | ||
wiki/icons-convert-strategic.sh | ||
wiki/icons-convert-unit.sh | ||
- name: Move Strategic Icons | ||
run: | | ||
mv -f fa/wiki/generated/strategicicons/*.png fa.wiki/icons/strategicicons | ||
mv -f fa/wiki/generated/units/*.png fa.wiki/icons/units | ||
- 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 "[email protected]" | ||
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
- (#6188) Create a Github workflow to automate the population of the Wiki |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters