mirror of
https://github.com/go-i2p/www.git
synced 2025-06-08 01:37:52 -04:00
add page.yml
This commit is contained in:
38
.github/workflows/page.yml
vendored
Normal file
38
.github/workflows/page.yml
vendored
Normal 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
3
cmd.sh
@ -6,6 +6,9 @@ outdir="processed/$LANGUAGE/"$(dirname $1)
|
|||||||
input=$1
|
input=$1
|
||||||
output=$(basename $1).md
|
output=$(basename $1).md
|
||||||
mkdir -p "$outdir"
|
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"
|
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 "$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"
|
python3 clean_markdown.py "$outdir/$output"
|
1
processed
Submodule
1
processed
Submodule
Submodule processed added at cb29a068a9
0
requirements.txt
Normal file
0
requirements.txt
Normal file
Reference in New Issue
Block a user