Put the following code in templates/web.china.template.yml
:
hooks:
before_code:
- exec:
cmd:
- su discourse -c 'git config --global url."https://githubfast.com/".insteadOf "https://github.com/"'
before_web:
- exec:
cmd:
- su discourse -c 'gem sources --add https://mirrors.tuna.tsinghua.edu.cn/rubygems/ --remove https://rubygems.org/'
- su discourse -c 'bundle config mirror.https://rubygems.org https://mirrors.tuna.tsinghua.edu.cn/rubygems'
before_yarn:
- exec:
cmd:
- su discourse -c 'yarn config set registry https://mirrors.huaweicloud.com/repository/npm/'
- su discourse -c 'pnpm config set registry https://mirrors.huaweicloud.com/repository/npm/'
before_bundle_exec:
- exec:
cmd:
- su discourse -c 'bundle config mirror.https://rubygems.org https://mirrors.tuna.tsinghua.edu.cn/rubygems'