element-plus/.github/workflows/publish-docs-deploy-manual.yml
renovate[bot] 0a79c3e33b
chore(deps): update all non-major dependencies (#7754)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: 三咲智子 <sxzz@sxzz.moe>
2022-05-17 21:46:20 +08:00

77 lines
2.0 KiB
YAML

name: Publish Docs Deploy (Manual)
on: workflow_dispatch
jobs:
deploy-docs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup pnpm
uses: pnpm/action-setup@v2
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- 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
run: cd docs && pnpm exec crowdin download -l zh-CN && pnpm exec crowdin download -l es-ES
- name: Generate common locale
run: pnpm docs:gen-locale
- name: Install latest Element Plus
run: cd docs && pnpm i element-plus@latest
- name: Build Metadata
run: cd internal/metadata && pnpm build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Build website
run: pnpm docs:build
env:
DOC_ENV: production
- name: Deploy
uses: JamesIves/github-pages-deploy-action@v4.3.3
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: Deploy to vercel
uses: JamesIves/github-pages-deploy-action@v4.3.3
with:
token: ${{ secrets.EP_BOT_TOKEN }}
branch: main
folder: docs/.vitepress/dist
repository-name: element-plus/vercel-publish
git-config-name: ElementPlusBot
git-config-email: hello@element-plus.org
- name: Sync
env:
TRIGGERSYNCURL: ${{ secrets.TRIGGERSYNCURL }}
run: curl -k "$TRIGGERSYNCURL"