add page.yml

This commit is contained in:
eyedeekay
2025-05-06 23:07:00 -04:00
parent 2c524f049f
commit d637a0ce75
4 changed files with 42 additions and 0 deletions

38
.github/workflows/page.yml vendored Normal file
View File

@ -0,0 +1,38 @@
name: Build and Deploy to GitHub Pages
on:
push:
branches: [ main ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
permissions:
contents: write
pages: write
id-token: write
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
- name: Install dependencies 📦
run: |
sudo apt-get update
sudo apt-get install python3 python3-polib python3-docutils pandoc python3-pip
pip3 install pypandoc
- name: Run build script 🔧
run: |
chmod +x ./cmd.sh
chmod +x ./run.sh
./run.sh
- name: Deploy to GitHub Pages 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: ./processed # The folder the action should deploy
branch: gh-pages # The branch the action should deploy to
clean: true # Automatically remove deleted files from the deploy branch

3
cmd.sh
View File

@ -6,6 +6,9 @@ outdir="processed/$LANGUAGE/"$(dirname $1)
input=$1
output=$(basename $1).md
mkdir -p "$outdir"
if [ ! -d "$outdir/_static" ]; then
cp -r static "$processed/_static"
fi
echo python3 "$main" --to-markdown --assets-dir static/ -o "$outdir/$output" "$input" "translations/$LANGUAGE/LC_MESSAGES/$posource"
python3 "$main" --to-markdown --assets-dir static/ -o "$outdir/$output" "$input" "translations/$LANGUAGE/LC_MESSAGES/$posource" 2>> err.$LANGUAGE.log 1>> log.$LANGUAGE.log
python3 clean_markdown.py "$outdir/$output"

1
processed Submodule

Submodule processed added at cb29a068a9

0
requirements.txt Normal file
View File