Update yuque.yml #3
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: Publish to Preview Knowledge Base | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
publish_to_preview: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Setup JDK | |
uses: actions/setup-java@v2 | |
with: | |
java-version: '11' | |
- name: Publish to Preview Knowledge Base | |
run: | | |
# 设置操作系统为 Ubuntu 20.04 | |
echo "::set-env name=DISTRIBUTION::ubuntu20.04" | |
# 执行你的自定义脚本文件,例如 publish.sh | |
# 在脚本中可以通过 $DISTRIBUTION 变量获取操作系统环境 | |
chmod +x publish.sh | |
./publish.sh |