feat: 添加页面加载进度条 (#10) #8
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: 部署 | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
name: 构建与部署 | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: 准备 Git 环境 | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: 准备 Node.js 环境 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18.15.0 | |
- name: 安装包管理器 | |
uses: pnpm/action-setup@v2.2.4 | |
with: | |
version: 8.3.1 | |
- name: 恢复缓存 | |
uses: actions/cache@v2 | |
with: | |
path: node_modules | |
key: dependencies | |
restore-keys: dependencies | |
- name: 安装依赖 | |
run: | | |
pnpm bootstrap | |
- name: 构建静态站点 | |
run: | | |
export NUXT_APP_BASE_URL=/bot-tools/ | |
pnpm generate | |
- name: 设置环境 | |
uses: actions/configure-pages@v3 | |
- name: 上传物料 | |
uses: actions/upload-pages-artifact@v1 | |
with: | |
path: .output/public | |
- name: 发布线上 | |
uses: actions/deploy-pages@v1 |