Merge pull request #8 from sunpu007/dev #4
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: Build and Deploy Vue 2 Project | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
name: Build and Deploy | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
ref: main | |
- name: Set up Node.js | |
uses: actions/setup-node@v1 | |
with: | |
node-version: '16.17.0' # 或者你项目所需的Node.js版本 | |
- name: Install dependencies | |
run: npm install | |
- name: Build the project | |
run: npm run build:prod | |
- name: Upload files | |
uses: actions/upload-artifact@v2 | |
with: | |
name: built-files | |
path: dist/* # 指向你构建的输出文件夹 |