Compare commits
3 Commits
20069bfe84
...
16028ba07e
Author | SHA1 | Date | |
---|---|---|---|
|
16028ba07e | ||
|
3039f3a415 | ||
|
884877572b |
45
.drone.yml
45
.drone.yml
@ -1,5 +1,6 @@
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: analyseAndBuild
|
||||
|
||||
steps:
|
||||
- name: code-analysis
|
||||
@ -26,7 +27,17 @@ steps:
|
||||
environment:
|
||||
VUE_APP_API_BASE_URL:
|
||||
from_secret: baseurl
|
||||
trigger:
|
||||
event:
|
||||
- push
|
||||
- pull_request
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: CopyToServer
|
||||
|
||||
steps:
|
||||
- name: scp files
|
||||
image: appleboy/drone-scp
|
||||
settings:
|
||||
@ -37,6 +48,34 @@ steps:
|
||||
port: 22
|
||||
target: /home/ubuntu/courses
|
||||
source: dist/*
|
||||
when:
|
||||
branch:
|
||||
- main
|
||||
|
||||
trigger:
|
||||
event:
|
||||
- promote
|
||||
target:
|
||||
- production
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
type: ssh
|
||||
name: Deploy
|
||||
|
||||
server:
|
||||
host: amine-louveau.fr
|
||||
user: ubuntu
|
||||
ssh_key:
|
||||
from_secret: ssh_key
|
||||
|
||||
steps:
|
||||
- name: copy
|
||||
commands:
|
||||
- cd /home/ubuntu/courses
|
||||
- mv dist/* ./
|
||||
- sudo chown www-data:www-data ./*
|
||||
- sudo rm -rf /var/www/amine/courses/*
|
||||
- sudo mv ./* /var/www/amine/courses/
|
||||
trigger:
|
||||
event:
|
||||
- promote
|
||||
target:
|
||||
- production
|
||||
|
@ -11,7 +11,7 @@
|
||||
</div>
|
||||
|
||||
<div class="level-right">
|
||||
<button class="button is-large" v-on:click="toggleModal">
|
||||
<button class="button is-large" v-on:click="newItem">
|
||||
<span class="icon is-medium">
|
||||
<ion-icon name="add-outline"></ion-icon>
|
||||
</span>
|
||||
@ -20,18 +20,19 @@
|
||||
</nav>
|
||||
<div class="columns">
|
||||
<div class="column is-one-quarter" v-for="item in lists" :key="item.id">
|
||||
<div class="card">
|
||||
<div class="card-content">
|
||||
<p class="title">
|
||||
{{item.name}}
|
||||
</p>
|
||||
<router-link :to="{ name: 'List', params: { id: item.id }}" custom v-slot="{ navigate }">
|
||||
<div class="card" @click="navigate">
|
||||
<div class="card-content">
|
||||
<p class="title">
|
||||
{{item.name}}
|
||||
</p>
|
||||
</div>
|
||||
<footer class="card-footer">
|
||||
<a href="#" class="card-footer-item" v-on:click.prevent="selectItem(item)">Edit</a>
|
||||
<a href="#" class="card-footer-item" v-on:click.prevent="deleteItem(item)">Delete</a>
|
||||
</footer>
|
||||
</div>
|
||||
<footer class="card-footer">
|
||||
<router-link class="card-footer-item" :to="{ name: 'List', params: { id: item.id }}">Select</router-link>
|
||||
<a href="#" class="card-footer-item" v-on:click="selectItem(item)">Edit</a>
|
||||
<a href="#" class="card-footer-item" v-on:click="deleteItem(item)">Delete</a>
|
||||
</footer>
|
||||
</div>
|
||||
</router-link>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -81,6 +82,10 @@ export default {
|
||||
toggleModal: function () {
|
||||
this.addModalShown = !this.addModalShown;
|
||||
},
|
||||
newItem: function () {
|
||||
this.selectedItem = null;
|
||||
this.toggleModal();
|
||||
},
|
||||
selectItem: function (item) {
|
||||
this.selectedItem = item;
|
||||
this.toggleModal();
|
||||
|
Loading…
Reference in New Issue
Block a user