2021-10-31 13:40:45 +08:00
|
|
|
name: Manual Deploy Docs Website
|
|
|
|
|
|
|
|
on: workflow_dispatch
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
deploy-docs:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Setup node
|
|
|
|
uses: actions/setup-node@v2
|
|
|
|
with:
|
|
|
|
node-version: '16'
|
|
|
|
|
|
|
|
- name: Setup pnpm
|
|
|
|
uses: pnpm/action-setup@v2
|
|
|
|
with:
|
|
|
|
version: latest
|
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
run: pnpm i --frozen-lockfile
|
|
|
|
|
|
|
|
- name: Init Crowdin token
|
|
|
|
run: pnpm run docs:crowdin-credentials
|
|
|
|
env:
|
|
|
|
CROWDIN_TOKEN: ${{secrets.CROWDIN_TOKEN}}
|
|
|
|
|
|
|
|
- name: Pull Crowdin translations
|
2022-01-05 20:30:57 +08:00
|
|
|
run: cd docs && pnpm exec crowdin download -l zh-CN
|
2021-10-31 13:40:45 +08:00
|
|
|
|
|
|
|
- name: Generate common locale
|
|
|
|
run: pnpm docs:gen-locale
|
|
|
|
|
|
|
|
- name: Install latest Element Plus
|
|
|
|
run: cd docs && pnpm i element-plus@latest
|
|
|
|
|
|
|
|
- name: Build website
|
|
|
|
run: pnpm docs:build
|
|
|
|
env:
|
|
|
|
DOC_ENV: production
|
|
|
|
|
|
|
|
- name: Deploy
|
2022-02-17 00:41:33 +08:00
|
|
|
uses: JamesIves/github-pages-deploy-action@v4.2.5
|
2021-10-31 13:40:45 +08:00
|
|
|
with:
|
|
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
branch: gh-pages
|
|
|
|
folder: docs/.vitepress/dist
|
|
|
|
git-config-name: ElementPlusBot
|
|
|
|
git-config-email: hello@element-plus.org
|
|
|
|
commit-message: website deploy
|
|
|
|
|
|
|
|
- name: Sync
|
|
|
|
env:
|
|
|
|
TRIGGERSYNCURL: ${{ secrets.TRIGGERSYNCURL }}
|
2022-01-12 01:02:45 +08:00
|
|
|
run: curl -k "$TRIGGERSYNCURL"
|