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

Skip to content

Version 3.25.3.12 / 4.2.1.1.2 #171

Version 3.25.3.12 / 4.2.1.1.2

Version 3.25.3.12 / 4.2.1.1.2 #171

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: 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' -not -path '*/pob/*' -o -name '*.html' -o -name '*.txt' ')' -delete -print | wc -l
- name: copy text files
run: cp RePoE/RePoE/*.txt RePoE/RePoE/data/
- name: install repoe
run: |
poetry install
poetry run pypoe_schema_import -a stable
poetry run pypoe_schema_import -a stable --poe2 -u https://repoe-fork.github.io/dat-export/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]