Skip to content

feat: 移动端适配(PART4.Final 规则对话框适配) #19

feat: 移动端适配(PART4.Final 规则对话框适配)

feat: 移动端适配(PART4.Final 规则对话框适配) #19

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: deploy-website
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the main branches.
push:
branches: [master]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
Build_and_Deploy:
# the type of runner that the job will run on
runs-on: ubuntu-latest
steps:
- name: Checkout repo & fetch update
uses: actions/checkout@v3
with:
# “最近更新时间” 等 git 日志相关信息,需要拉取全部提交记录
fetch-depth: 0
# actions/checkout 签出软件仓库的步骤中,Github 工作流程会自动使用可用的 GITHUB_TOKEN 密钥与 Github 进行身份验证
# 然后,尽管我在该步骤中注入了个人访问令牌作为环境变量,但它还是将该步骤中的凭据持久化,并在发布软件包的步骤中重复使用这些凭据。
# 因此将该配置项设为false,可以使Github 工作流程在最后一步才使用个人访问令牌与 GitHub 进行身份验证
persist-credentials: false
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
# 选择要使用的 pnpm 版本
version: 9
# 使用 pnpm 安装依赖
run_install: true
- name: Setup Node.js
uses: actions/setup-node@v3
with:
# 选择要使用的 node 版本
node-version: 18
# 缓存 pnpm 依赖
cache: pnpm
# 运行构建脚本
- name: Build Bobing Site
run: pnpm build
# 写入自定义域名
# - name: Configure custom domain
# run: echo bobing.jeacsonsnake.com >> dist/CNAME
# 查看 workflow 的文档来获取更多信息
# @see https://github.com/crazy-max/ghaction-github-pages
- name: Deploy to GitHub Pages
if: success()
uses: crazy-max/ghaction-github-pages@v3
with:
# 部署到 gh-pages 分支
target_branch: gh-pages
# 部署目录为默认输出目录
build_dir: dist
env:
# @see https://docs.github.com/cn/actions/reference/authentication-in-a-workflow#about-the-github_token-secret
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}