Workflow config file is invalid. Please check your config file: yaml: line 8: mapping values are not allowed in this context

33 lines
2.3 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

name: Build Vue Project
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4 # 注意在Gitea中可能使用gitea的actions/checkout但通常兼容
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '20'
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
# 将构建产物打包成tar.gz
- name: Archive build output
run: tar -zcvf dist.tar.gz dist
# 上传Artifact
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: dist-artifact
path: dist.tar.gz
retention-days: 7 retention-days: 7 # 产物保留天数