Skip to content

Latest commit

 

History

History
72 lines (49 loc) · 1.98 KB

File metadata and controls

72 lines (49 loc) · 1.98 KB

Docs Deployment on Tencent Cloud (Lite Server)

DNS Records

Create A records to your Tencent Cloud public IP:

  1. element-plus-x.com
  2. v1.element-plus-x.com
  3. v2.element-plus-x.com

Nginx Config

  1. Copy scripts/docs/nginx/element-plus-x.conf to /etc/nginx/conf.d/element-plus-x.conf.
  2. Create the redirect target file:
sudo mkdir -p /var/www/element-plus-x/root
echo 'set $root_target https://v1.element-plus-x.com;' | sudo tee /var/www/element-plus-x/root/redirect.conf
  1. Create base directories:
sudo mkdir -p /var/www/element-plus-x/v1/releases /var/www/element-plus-x/v2/releases
sudo mkdir -p /var/www/element-plus-x/v1/current /var/www/element-plus-x/v2/current
  1. Test and reload:
sudo nginx -t
sudo systemctl reload nginx

HTTPS (Recommended)

Use Certbot to issue TLS certificates for the three domains. Example:

sudo apt update
sudo apt install -y certbot python3-certbot-nginx
sudo certbot --nginx -d element-plus-x.com -d v1.element-plus-x.com -d v2.element-plus-x.com

GitHub Secrets Required

Configure these secrets in the repo settings:

  1. DOCS_DEPLOY_HOST
  2. DOCS_DEPLOY_PORT
  3. DOCS_DEPLOY_USER
  4. DOCS_DEPLOY_SSH_KEY
  5. DOCS_DEPLOY_BASE_DIR (suggested: /var/www/element-plus-x)

Workflows

Docs Deploy Verify

Use the Docs Deploy Verify workflow for the first end-to-end server test.

  • Trigger it manually from the default branch.
  • Point source_ref to the branch or tag you want to build.
  • It uploads to ${DOCS_DEPLOY_BASE_DIR}/verify/<line>/<verify_id>.
  • It does not switch current, does not change root/redirect.conf, and does not reload nginx.

Docs Release

Use the Docs Release workflow for release uploads and cutover.

  • switch_current=false uploads the release without switching live traffic.
  • switch_current=true updates the <line>/current symlink.
  • update_root_redirect=true updates the root domain redirect when the release should become the default docs line.