Skip to content

Deploy Website

Deploy Website #7

Workflow file for this run

name: Deploy Website
on:
workflow_dispatch:
jobs:
publish-to-github-pages:
name: Build for international
runs-on: ubuntu-latest
timeout-minutes: 20
permissions:
contents: write
steps:
# Checkout Project
- name: Checkout The Docs Repo
uses: actions/checkout@v3
# Setup Node.js
- uses: actions/setup-node@v2
with:
node-version: "16"
cache: "yarn"
cache-dependency-path: docusaurus/package-lock.json
# Setup Python 3.8
- uses: actions/setup-python@v2
with:
python-version: "3.8.14"
# Build for international release
- name: 🔨 Build
run: |
PLATFORM_HOSTNAME=platform.colossalai.com bash ./scripts/build.sh
mv ./docusaurus/build ./
# Deploy to GitHub Pages for international release
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build
cname: docs.platform.colossalai.com
publish-to-ali-cloud:
name: Build for China release
runs-on: ubuntu-latest
timeout-minutes: 20
permissions:
contents: write
steps:
# Checkout Project
- name: Checkout The Docs Repo
uses: actions/checkout@v3
# Setup Node.js
- uses: actions/setup-node@v2
with:
node-version: "16"
cache: "yarn"
cache-dependency-path: docusaurus/package-lock.json
# Setup Python 3.8
- uses: actions/setup-python@v2
with:
python-version: "3.8.14"
# Build for international release
- name: 🔨 Build
run: |
PLATFORM_HOSTNAME=platform.luchentech.com bash ./scripts/build.sh
mv ./docusaurus/build ./
# scp to cloud server for China release
- name: Deploy to Private Cloud Server
uses: garygrossgarten/github-action-scp@release
with:
local: build
remote: ${{ secrets.CLOUD_SERVER_BUILD_PATH }}
host: ${{ secrets.CLOUD_SERVER_HOST }}
username: ${{ secrets.CLOUD_SERVER_USER }}
password: ${{ secrets.CLOUD_SERVER_PASSWORD }}
dotfiles: true
rmRemote: true