From 16f4e2ba7a0ae91d93ebf27ab6ee712481896aef Mon Sep 17 00:00:00 2001 From: "sq]s" <100999666+squarebracket-s@users.noreply.github.com> Date: Sat, 4 Apr 2026 09:28:31 +0200 Subject: [PATCH] add wiki workflow --- .github/workflows/generate-pages.yml | 55 ++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 .github/workflows/generate-pages.yml diff --git a/.github/workflows/generate-pages.yml b/.github/workflows/generate-pages.yml new file mode 100644 index 0000000000..d3fc0e0b29 --- /dev/null +++ b/.github/workflows/generate-pages.yml @@ -0,0 +1,55 @@ +name: Generate wiki [source update] +on: + push: + branches: + - 'master' + +concurrency: + group: "pages" + cancel-in-progress: true + +jobs: + build: + name: generate-pages + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + with: + ref: wiki_gen + - uses: actions/setup-python@v6 + with: + python-version: '3.14' + - name: Setup venv + run: python -m venv venv; ./venv/bin/pip install -r requirements.txt + + - name: Clone ZR repo + run: git clone https://github.com/artvin01/TF2-Zombie-Riot + + - name: Parse ZR repo code + run: ./venv/bin/python main.py + + - name: Move repo_img and builtin_img to wiki + run: | + mv repo_img/ ./gh-pages/repo_img/ + mv builtin_img/ ./gh-pages/builtin_img/ + mv premedia_icons/ ./gh-pages/premedia_icons/ + + - name: Upload static files as artifact + id: deployment + uses: actions/upload-pages-artifact@v4 + with: + path: gh-pages/ + + deploy: + runs-on: ubuntu-latest + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + permissions: + pages: write + id-token: write + needs: build + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v5 \ No newline at end of file