Skip to content

Commit

Permalink
fix: Try to do auto doc gen
Browse files Browse the repository at this point in the history
  • Loading branch information
Panakotta00 committed Oct 26, 2024
1 parent 1b6c894 commit d6e226b
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 44 deletions.
76 changes: 35 additions & 41 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,25 +96,13 @@ jobs:
- name: Package FicsItNetworks Mod
run: ${{ github.workspace }}\ue\Engine\Build\BatchFiles\RunUAT.bat -ScriptsForProject='${{ github.workspace }}\SatisfactoryModLoader\FactoryGame.uproject' PackagePlugin -project='${{ github.workspace }}\SatisfactoryModLoader\FactoryGame.uproject' -clientconfig=Shipping -serverconfig=Shipping -DLCName='FicsItNetworks' -build -utf8output -platform=Win64 -serverplatform=Win64+Linux -nocompileeditor -installed -merge

# - name: Generate Reflection & Lua Documentation
# run: ${{ github.workspace }}\ue\\Engine\Binaries\Win64\UnrealEditor-Cmd.exe "${{ github.workspace }}\SatisfactoryModLoader\FactoryGame.uproject" -skipcompile -Unattended -NoPause -AllowSoftwareRendering "-ExecCmds=FINGenRefDoc,FINGenLuaDoc,quit_editor"

- name: Upload FicsItNetworks-Windows.zip
- name: Upload FicsItNetworks
id: upload-win64
uses: actions/upload-artifact@v4
with:
name: FicsItNetworks-Windows
name: FicsItNetworks
path: ${{github.workspace}}\SatisfactoryModLoader\Saved\ArchivedPlugins\FicsItNetworks\*.zip

# - name: Upload Documentation
# id: upload-documentation
# uses: actions/upload-artifact@v4
# with:
# name: Documentation
# path: |
# %LocalAppData%\FactoryGame\Saved\FINReflectionDocumentation.json
# %LocalAppData%\FactoryGame\Saved\FINLuaDocumentation.lua

- name: Discord Webhook Action
uses: Panakotta00/[email protected]
if: always()
Expand All @@ -128,30 +116,36 @@ jobs:
if: ${{ !failure() }}
run: Remove-Item C:\actions-runner\_work\FicsIt-Networks\FicsIt-Networks\* -Recurse -Force -Confirm:$false -ErrorAction Ignore

# documentation:
# needs: build
# if: github.ref == 'refs/heads/master' && github.event_name != 'pull_request'
# name: Update Documentation
# runs-on: ubuntu-latest
# permissions:
# contents: write
# steps:
# - uses: actions/checkout@v4
# - name: Download Reflection Documentation
# uses: actions/download-artifact@v4
# with:
# name: Documentation
# path: ./docs
# - name: Rewrite ASCIIDOC with new Documentation
# run: python ./docs/PatchDocWithReflectionDoc.py FINReflectionDocumentation.json
# - name: Configure Git
# run: |
# git config user.name "$GITHUB_ACTOR"
# git config user.email "[email protected]"
# - name: Commit
# run: |
# git add index.zip
# git commit -m "Update Reflection Documentation"
# - name: Push
# run: |
# git push
generate-docs:
name: Generate Documentation
runs-on: ubuntu-latest
steps:
- name: Setup steamcmd
uses: CyberAndrii/setup-steamcmd@v1

- name: Download Satisfactroy Dedicated Server
run: |
steamcmd +force_install_dir "${{ github.workspace }}/SatisfactoryDedicatedServer" +login anonymous +app_update 1690800 validate +quit
- name: Download FicsIt-Networks
uses: actions/download-artifact@master
with:
name: FicsItNetworks
path: ${{ github.workspace }}

- name: Install FicsIt-Networks
run: |
unzip FicsItNetworks-LinuxServer.zip -d SatisfactoryDedicatedServer/FactoryGame/Mods/FicsItNetworks
- name: Generate Documentation
working-directory: SatisfactoryDedicatedServer
run: ./FactoryServer.sh -FINGenDocAndQuit

- name: Upload Documentation
id: upload-documentation
uses: actions/upload-artifact@v4
with:
name: Documentation
path: |
~/.config/Epic/FactoryGame/Saved/FINReflectionDocumentation.json
~/.config/Epic/FactoryGame/Saved/FINLuaDocumentation.lua
39 changes: 36 additions & 3 deletions .github/workflows/gen-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,41 @@ jobs:
- name: Download Satisfactroy Dedicated Server
run: |
steamcmd +force_install_dir "${{ github.workspace }}/SatisfactoryDedicatedServer" +login anonymous +app_update 1690800 validate +quit
ls .
ls ~
- name: Find FicsIt-Networks Binary
uses: actions/github-script@v7
id: find-ficsit-networks
with:
result-encoding: number
script: |
const artifacts = github.rest.actions.listArtifactsForRepo({
owner: context.repo.owner,
repo: context.repo.repo,
per_page: 1,
name: "FicsItNetworks"
});
return artifacts.artifacts[0].workflow_run.id;
- name: Download FicsIt-Networks
uses: actions/download-artifact@v4
with:
name: FicsItNetworks
run-id: ${{ steps.find-ficsit-networks.outputs.result }}
path: ${{ github.workspace }}

- name: Install FicsIt-Networks
run: |
unzip FicsItNetworks-LinuxServer.zip -d SatisfactoryDedicatedServer/FactoryGame/Mods/FicsItNetworks
- name: Generate Documentation
working-directory: SatisfactoryDedicatedServer
run: ./FactoryServer.sh "-ExecCmds=FINGenRefDoc,FINGenLuaDoc,quit_editor"
run: ./FactoryServer.sh -FINGenDocAndQuit

- name: Upload Documentation
id: upload-documentation
uses: actions/upload-artifact@v4
with:
name: Documentation
path: |
~/.config/Epic/FactoryGame/Saved/FINReflectionDocumentation.json
~/.config/Epic/FactoryGame/Saved/FINLuaDocumentation.lua

0 comments on commit d6e226b

Please sign in to comment.