chore: 添加变量声明组件语法说明 #511
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: DEPLOYMENT | |
on: | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- '**/github/**' | |
- './README.md' | |
- './.pages.yml' | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
# “最近更新时间” 等 git 日志相关信息,需要拉取全部提交记录 | |
fetch-depth: 0 | |
- name: Set node version to 20 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- name: Cache pnpm modules | |
uses: actions/cache@v2 | |
with: | |
path: ~/.pnpm-store | |
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}- | |
- name: Install dependencies | |
uses: pnpm/action-setup@v2 | |
with: | |
run_install: true | |
# 构建 | |
- name: Export .env File | |
run: pnpm build-env | |
env: | |
BLOG_CHANGELOG_WINCLIENT_ZH_ID: ${{ env.BLOG_CHANGELOG_WINCLIENT_ZH_ID }} | |
BLOG_CHANGELOG_WINCLIENT_EN_ID: ${{ env.BLOG_CHANGELOG_WINCLIENT_EN_ID }} | |
BLOG_CHANGELOG_WINCLIENT_JA_ID: ${{ env.BLOG_CHANGELOG_WINCLIENT_JA_ID }} | |
BLOG_CHANGELOG_WEB_ZH_ID: ${{ env.BLOG_CHANGELOG_WEB_ZH_ID }} | |
BLOG_CHANGELOG_WEB_EN_ID: ${{ env.BLOG_CHANGELOG_WEB_EN_ID }} | |
BLOG_CHANGELOG_WEB_JA_ID: ${{ env.BLOG_CHANGELOG_WEB_JA_ID }} | |
- name: Refresh Members Data | |
run: pnpm build-member | |
env: | |
GITEE_USERNAME: ${{ secrets.GITEE_USERNAME }} | |
GITEE_PASSWORD: ${{ secrets.GITEE_PASSWORD }} | |
- name: Refresh Blog Data | |
run: pnpm build-blog | |
env: | |
GITEE_USERNAME: ${{ secrets.GITEE_USERNAME }} | |
GITEE_PASSWORD: ${{ secrets.GITEE_PASSWORD }} | |
- name: Build Site | |
run: pnpm build-vitepress | |
- name: Build lunaria | |
run: pnpm lunaria:build | |
# 部署 | |
- name: Deploy | |
uses: easingthemes/[email protected] | |
env: | |
SSH_PRIVATE_KEY: ${{ secrets.ACCESS_TOKEN }} | |
# 删除服务器上目录里所有文件 | |
# ARGS: '-avz --delete' | |
# 项目 build 后静态文件位置 | |
SOURCE: './dist/' | |
REMOTE_HOST: ${{ secrets.REMOTE_HOST }} | |
REMOTE_PORT: ${{ secrets.REMOTE_PORT }} | |
REMOTE_USER: ${{ secrets.REMOTE_USER }} | |
TARGET: ${{ secrets.TARGET }} |