mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-12-13 17:05:47 +08:00
61 lines
1.4 KiB
YAML
61 lines
1.4 KiB
YAML
name: Deploy Doc Website
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
master-deploy:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
with:
|
|
persist-credentials: false
|
|
- name: Setup node
|
|
uses: actions/setup-node@v2
|
|
with:
|
|
node-version: '16'
|
|
|
|
- name: Install dependencies
|
|
run: yarn bootstrap
|
|
|
|
- name: Init docs
|
|
run: cd docs && yarn
|
|
|
|
- name: Fetch Crowdin token for pulling languages
|
|
run: yarn docs:crowdin
|
|
env:
|
|
CROWDIN_TOKEN: ${{secrets.CROWDIN_TOKEN}}
|
|
|
|
- name: Pull Crowdin translations
|
|
run: cd docs && yarn crowdin download
|
|
|
|
- name: Generate common locale
|
|
run: yarn docs:gen-locale
|
|
|
|
- name: Build website
|
|
run: yarn docs:build
|
|
env:
|
|
DOC_ENV: production
|
|
|
|
# - name: Build Indices
|
|
# run: yarn build:indices
|
|
# env:
|
|
# ALGOLIA_KEY: ${{secrets.ALGOLIA_KEY}}
|
|
|
|
- name: Deploy
|
|
uses: JamesIves/github-pages-deploy-action@3.7.1
|
|
with:
|
|
GITHUB_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 }}
|
|
run: curl "$TRIGGERSYNCURL"
|