hooks:
  before_code:
    - exec:
        cmd:
          - su discourse -c 'git config --global url."https://mirror.ghproxy.com/https://github.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/'

  before_yarn:
    - exec:
        cmd:
          - su discourse -c 'pnpm config set registry https://registry.npmmirror.com --global'

  before_bundle_exec:
    - exec:
        cmd:
          - su discourse -c 'bundle config mirror.https://rubygems.org https://mirrors.tuna.tsinghua.edu.cn/rubygems'
