23 #5
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
name: Build | |
on: | |
push: | |
branches: [ master ] | |
workflow_dispatch: | |
inputs: | |
overwrite: | |
description: "Overwrite output even if it doesn't seem outdated? Boolean. Default: false" | |
required: true | |
default: 'false' | |
jobs: | |
transform: | |
timeout-minutes: 120 | |
runs-on: ubuntu-latest | |
# stardict-tools was missing on ubuntu-20.04 as of 20210403 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@master | |
with: | |
submodules: true | |
fetch-depth: 1 | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: '3.9' | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y python3-setuptools stardict-tools --fix-missing | |
git clone https://github.com/indic-dict/dict-tools.git ~/dict-tools/ --depth 1 | |
sudo pip3 install lxml PyICU pyglossary | |
# Requirements as per https://github.com/ilius/pyglossary | |
- name: Build dicts | |
run: | | |
make full GITHUB_TOKEN="${{ secrets.GITHUB_TOKEN }}" OVERWRITE="${{ github.event.inputs.overwrite||'false' }}" | |
# git config --global user.email "[email protected]" | |
# git config --global user.name "Github Actions" | |
# git add -A -v | |
# git commit --allow-empty -m "Add auto-built files." | |
# - name: Push changes | |
# uses: ad-m/github-push-action@master | |
# with: | |
# github_token: ${{ secrets.GITHUB_TOKEN }} | |
# branch: gh-pages | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
if: ${{ github.event_name != 'pull_request'}} | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./ | |
publish_branch: gh-pages |