Compare commits
10 Commits
379a4d7033
...
0ea1fec3e1
Author | SHA1 | Date | |
---|---|---|---|
0ea1fec3e1 | |||
5a9ff0130e | |||
06b98cb9ad | |||
1b4007e3ec | |||
7df558eda4 | |||
bb5e438fd0 | |||
85d7322b4c | |||
142259731e | |||
69dbb346f5 | |||
3382414001 |
8
.drone copy 2.yml
Normal file
8
.drone copy 2.yml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
kind: pipeline # 定义一个管道
|
||||||
|
type: docker # 当前管道的类型
|
||||||
|
name: test # 当前管道的名称
|
||||||
|
steps: # 定义管道的执行步骤
|
||||||
|
- name: test # 步骤名称
|
||||||
|
image: node:latest # 当前步骤使用的镜像
|
||||||
|
commands: # 当前步骤执行的命令
|
||||||
|
- echo 测试drone执行
|
3
.drone copy.yml
Normal file
3
.drone copy.yml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
kind: pipeline # 定义一个管道
|
||||||
|
type: docker # 当前管道的类型
|
||||||
|
name: test # 当前管道的名称
|
79
.drone.yml
79
.drone.yml
@ -1,8 +1,77 @@
|
|||||||
kind: pipeline # 定义一个管道
|
kind: pipeline # 定义一个管道
|
||||||
type: docker # 当前管道的类型
|
type: docker # 当前管道的类型
|
||||||
name: test # 当前管道的名称
|
name: test # 当前管道的名称
|
||||||
steps: # 定义管道的执行步骤
|
|
||||||
- name: test # 步骤名称
|
steps:
|
||||||
image: node:latest # 当前步骤使用的镜像
|
# 第一步:构建项目
|
||||||
commands: # 当前步骤执行的命令
|
- name: build
|
||||||
- echo 测试drone执行
|
image: node:18-alpine
|
||||||
|
commands:
|
||||||
|
- npm install
|
||||||
|
- vite build
|
||||||
|
volumes:
|
||||||
|
- name: node_modules_cache
|
||||||
|
path: /drone/src/node_modules
|
||||||
|
|
||||||
|
# 第二步:部署到服务器
|
||||||
|
- name: deploy
|
||||||
|
image: appleboy/drone-ssh
|
||||||
|
settings:
|
||||||
|
host:
|
||||||
|
from_secret: server_host
|
||||||
|
username:
|
||||||
|
from_secret: server_username
|
||||||
|
password:
|
||||||
|
from_secret: server_password
|
||||||
|
# 或者使用SSH密钥
|
||||||
|
# key:
|
||||||
|
# from_secret: server_ssh_key
|
||||||
|
port: 22
|
||||||
|
script:
|
||||||
|
- rm -rf /www/wwwroot/show.zguiy.com/*
|
||||||
|
- mkdir -p /www/wwwroot/show.zguiy.com/
|
||||||
|
when:
|
||||||
|
branch:
|
||||||
|
- main
|
||||||
|
- master
|
||||||
|
- dev
|
||||||
|
|
||||||
|
# 第三步:上传构建文件
|
||||||
|
- name: upload
|
||||||
|
image: appleboy/drone-scp
|
||||||
|
settings:
|
||||||
|
host:
|
||||||
|
from_secret: server_host
|
||||||
|
username:
|
||||||
|
from_secret: server_username
|
||||||
|
password:
|
||||||
|
from_secret: server_password
|
||||||
|
# 或者使用SSH密钥
|
||||||
|
# key:
|
||||||
|
# from_secret: server_ssh_key
|
||||||
|
port: 22
|
||||||
|
source: dist/*
|
||||||
|
target: /www/wwwroot/show.zguiy.com/
|
||||||
|
strip_components: 1
|
||||||
|
rm: true
|
||||||
|
when:
|
||||||
|
branch:
|
||||||
|
- main
|
||||||
|
- master
|
||||||
|
- dev
|
||||||
|
|
||||||
|
# 定义数据卷用于缓存node_modules
|
||||||
|
volumes:
|
||||||
|
- name: node_modules_cache
|
||||||
|
host:
|
||||||
|
path: /tmp/drone_cache/node_modules
|
||||||
|
|
||||||
|
# 触发条件
|
||||||
|
trigger:
|
||||||
|
branch:
|
||||||
|
- main
|
||||||
|
- master
|
||||||
|
- dev
|
||||||
|
event:
|
||||||
|
- push
|
||||||
|
- pull_request
|
||||||
|
41
1.vue
41
1.vue
@ -1,41 +0,0 @@
|
|||||||
<script setup lang="ts">
|
|
||||||
import { ref } from 'vue'
|
|
||||||
|
|
||||||
defineProps<{ msg: string }>()
|
|
||||||
|
|
||||||
const count = ref(0)
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<h1>{{ msg }}</h1>
|
|
||||||
|
|
||||||
<div class="card">
|
|
||||||
<button type="button" @click="count++">count is {{ count }}</button>
|
|
||||||
<p>
|
|
||||||
Edit
|
|
||||||
<code>components/HelloWorld.vue</code> to test HMR
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Check out
|
|
||||||
<a href="https://vuejs.org/guide/quick-start.html#local" target="_blank"
|
|
||||||
>create-vue</a
|
|
||||||
>, the official Vue + Vite starter
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
Learn more about IDE Support for Vue in the
|
|
||||||
<a
|
|
||||||
href="https://vuejs.org/guide/scaling-up/tooling.html#ide-support"
|
|
||||||
target="_blank"
|
|
||||||
>Vue Docs Scaling up Guide</a
|
|
||||||
>.
|
|
||||||
</p>
|
|
||||||
<p class="read-the-docs">Click on the Vite and Vue logos to learn more</p>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
.read-the-docs {
|
|
||||||
color: #888;
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -12,7 +12,7 @@ import HelloWorld from './components/HelloWorld.vue'
|
|||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
sfgdfgdfhfgh
|
sfgdfgdfhfgh
|
||||||
<HelloWorld msg="Vite + fghfdgdfggjfghgjhsfsdfdfghg11111111111jghj" />
|
<HelloWorld msg="Vite + 高峰过后结双方的果很快ui哦山豆根豆腐干里噢批哦就将很快" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
Reference in New Issue
Block a user