hyperf/.github/workflows/docs.yml
李铭昕 2f30865d2f Merge branch 'master' into 3.0-merge
# Conflicts:
#	docs/zh-cn/coroutine.md
#	docs/zh-hk/coroutine.md
#	docs/zh-tw/coroutine.md
#	src/model-cache/src/Manager.php
2022-03-27 17:13:53 +08:00

49 lines
1.0 KiB
YAML

name: Translate docs
on:
push:
branches:
- release-*
- docs*
jobs:
translate:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.0
tools: phpize
extensions: swoole, redis
ini-values: extension=opencc
- name: Install OpenCC
run: |
sudo apt-get install libopencc-dev -y
- name: Build opencc4php
run: |
git clone https://github.com/nauxliu/opencc4php.git --depth 1
cd opencc4php
phpize
./configure
make
sudo make install
php --ri opencc
cd ..
rm -rf opencc4php
- name: Start Translate
run: |
composer install
php bin/doc-translate
- name: Commit Updated
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Update docs and translate