This commit is contained in:
parent
dd2aef016c
commit
26c0cf6c28
@ -1,3 +1,4 @@
|
|||||||
node_modules
|
node_modules
|
||||||
dist
|
dist
|
||||||
.git
|
.git
|
||||||
|
.env
|
||||||
35
.drone.yml
35
.drone.yml
@ -1,9 +1,36 @@
|
|||||||
kind: pipeline
|
kind: pipeline
|
||||||
type: docker
|
type: docker
|
||||||
name: test-pipeline
|
name: default
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: say-hello
|
- name: Install dependencies
|
||||||
image: alpine
|
image: node:18-alpine
|
||||||
commands:
|
commands:
|
||||||
- echo "Hello from Drone CI!"
|
- npm ci
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
image: node:18-alpine
|
||||||
|
commands:
|
||||||
|
- npm run build
|
||||||
|
|
||||||
|
- name: Build Docker Image
|
||||||
|
image: docker:latest
|
||||||
|
environment:
|
||||||
|
DOCKER_USERNAME:
|
||||||
|
from_secret: DOCKER_USERNAME
|
||||||
|
DOCKER_PASSWORD:
|
||||||
|
from_secret: DOCKER_PASSWORD
|
||||||
|
commands:
|
||||||
|
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
|
||||||
|
- docker build -t adminsoftwarecraft/opengis:latest .
|
||||||
|
- docker push adminsoftwarecraft/opengis:latest
|
||||||
|
|
||||||
|
- name: Deploy to Server
|
||||||
|
image: curlimages/curl:latest
|
||||||
|
environment:
|
||||||
|
WEBHOOK_URL:
|
||||||
|
from_secret: WEBHOOK_URL
|
||||||
|
WEBHOOK_SECRET:
|
||||||
|
from_secret: WEBHOOK_SECRET
|
||||||
|
commands:
|
||||||
|
- 'curl -X POST "$WEBHOOK_URL" -H "Authorization: Bearer $WEBHOOK_SECRET"'
|
||||||
|
|||||||
@ -2,7 +2,7 @@ function App() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex flex-col items-center justify-center min-h-screen py-2">
|
<div className="flex flex-col items-center justify-center min-h-screen py-2">
|
||||||
<h1 className="text-3xl font-bold underline text-center">สวัสดี! การ Deploy อัตโนมัติสำเร็จ</h1>
|
<h1 className="text-3xl font-bold underline text-center">สวัสดี! CI/CD อัตโนมัติสำเร็จ</h1>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user