Skip to content

Deploy static content to Pages #6

Deploy static content to Pages

Deploy static content to Pages #6

Workflow file for this run

# Simple workflow for deploying static content to GitHub Pages
name: Deploy static content to Pages
on:
# Runs on pushes targeting the default branch
push:
branches: ["vue3+vite+typescript"]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
# 任务ID
build-and-deploy:
# 运行环境
runs-on: ubuntu-latest
# 步骤
steps:
# 官方action,将代码拉取到虚拟机
- name: Checkout ️
uses: actions/checkout@v3
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: 18
cache: 'npm'
- name: Install dependencies
run: npm install
- name: Build
run: npm run build
- name: Deploy # 部署
uses: JamesIves/[email protected]
with:
branch: gh-pages # 部署后提交到那个分支
folder: dist # 这里填打包好的目录名称