-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
44 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: build | ||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
submodules: true | ||
- name: Set up Python 3.11 | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: '3.11' | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install markdown pyyaml beautifulsoup4 | ||
- name: Build all documentation | ||
run: | | ||
export TUNA_TEMP_DIR=$(mktemp -d) | ||
cat enabled.txt | xargs python global/compile.py -v --lang zh -C dom -C tuna | ||
git checkout transpiled | ||
mv $TUNA_TEMP_DIR/* . | ||
- name: Commit changes | ||
run: | | ||
git config --local user.name "GitHub Actions" | ||
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||
git add *.md | ||
git commit -am "sync global documentations" && git push || echo "No changes to commit" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters