Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Version 3.25.3.12 / 4.2.0.13 #166

Version 3.25.3.12 / 4.2.0.13

Version 3.25.3.12 / 4.2.0.13 #166

Workflow file for this run

name: Run data export
on:
workflow_dispatch:
push:
branches: [ "master" ]
jobs:
build:
runs-on: ubuntu-latest
outputs:
changes_detected: ${{ steps.autocommit.outputs.changes_detected }}
steps:
- name: checkout
uses: actions/[email protected]
with:
path: RePoE
- name: checkout pypoe
uses: actions/[email protected]
with:
repository: lvlvllvlvllvlvl/PyPoE
path: PyPoE
- name: checkout pob
uses: actions/[email protected]
with:
repository: PathOfBuildingCommunity/PathOfBuilding
path: PathOfBuilding
- name: checkout pob2
uses: actions/[email protected]
with:
repository: PathOfBuildingCommunity/PathOfBuilding-PoE2
path: PathOfBuilding2
- uses: leafo/[email protected]
with:
luaVersion: luajit-openresty
- uses: leafo/gh-actions-luarocks@v5
- name: install a lua dependencies
run: |
luarocks install dkjson
- name: Install poetry
run: pipx install 'poetry~=1.8'
- name: setup python
uses: actions/[email protected]
with:
python-version: "3.11"
cache: poetry
- name: clean data dir
run: find RePoE/RePoE/data/ '(' -name '*.json' -o -name '*.html' -o -name '*.txt' ')' -delete -print | wc -l
- name: copy text files
run: cp RePoE/RePoE/*.txt RePoE/RePoE/data/
- name: lua export
run: |
find PathOfBuilding/src/Data/ -type d | sed 's|PathOfBuilding/src/Data|RePoE/RePoE/data/pob|g' | while read DIR; do mkdir -p $DIR; done
find PathOfBuilding/src/Data/ -name '*.lua' -exec lua RePoE/lua/Generate.lua '{}' RePoE/RePoE/data/pob/ \;
find PathOfBuilding2/src/Data/ -type d | sed 's|PathOfBuilding2/src/Data|RePoE/RePoE/data/poe2/pob|g' | while read DIR; do mkdir -p $DIR; done
find PathOfBuilding2/src/Data/ -name '*.lua' -exec lua RePoE/lua/Generate.lua '{}' RePoE/RePoE/data/poe2/pob/ \;
- name: install repoe
run: |
poetry install
poetry run pypoe_schema_import -a stable
poetry run pypoe_schema_import -a stable --poe2 -u https://raw.githubusercontent.com/lvlvllvlvllvlvl/dat-schema-validator/refs/heads/develop/poe2/filtered.json
working-directory: RePoE/RePoE
- name: update models
run: |
for i in *.schema.json
do
poetry run datamodel-codegen --input $i --input-file-type jsonschema --output ../model/${i/.schema.json/.py} --output-model-type pydantic_v2.BaseModel --disable-timestamp --use-double-quotes --enable-version-header
done
poetry run generate-schema-doc --config footer_show_time=false ./ ../data/
working-directory: RePoE/RePoE/schema
- name: run export
run: |
poetry --version
poetry run repoe all -l all --poe2
poetry run repoe all -l all
working-directory: RePoE/RePoE
- name: generate index.html
run: |
find -type d -exec tree {} -H '.' --dirsfirst -F -L 1 -T "RePoE - Game version $(cat ../version.txt) / $(cat ../version2.txt)" -I 'index.html|schema_doc*' --noreport --charset utf-8 -o {}/index.html \;
sed -i 's|<h1>RePoE|<h1><a href="https://github.com/repoe-fork/repoe-fork">RePoE</a>|' index.html
working-directory: RePoE/RePoE/data/
- name: commit changes
id: autocommit
uses: stefanzweifel/[email protected]
with:
repository: RePoE
commit_message: "[skip ci] Automated export"
- name: upload gh-pages artifact
if: github.event_name == 'workflow_dispatch' || steps.autocommit.outputs.changes_detected == 'true'
uses: actions/[email protected]
with:
path: RePoE/RePoE/data/
deploy:
runs-on: ubuntu-latest
needs: build
if: github.event_name == 'workflow_dispatch' || needs.build.outputs.changes_detected == 'true'
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: deploy gh-pages
id: deployment
uses: actions/[email protected]