This commit is contained in:
parent
1eb285dc63
commit
bbf5826b0f
32
.drone.yml
32
.drone.yml
@ -1,38 +1,12 @@
|
|||||||
---
|
|
||||||
kind: pipeline
|
|
||||||
type: exec
|
|
||||||
name: build image
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: build
|
|
||||||
commands:
|
|
||||||
- docker build . -t git.lulzette.ru/lulzette/geeksstuffwiki:latest
|
|
||||||
- name: login
|
|
||||||
commands:
|
|
||||||
- docker login git.lulzette.ru -u lulzette -p $gitea_key
|
|
||||||
environment:
|
|
||||||
gitea_key:
|
|
||||||
from_secret: gitea_key
|
|
||||||
- name: push
|
|
||||||
commands:
|
|
||||||
- docker push git.lulzette.ru/lulzette/geeksstuffwiki:latest
|
|
||||||
|
|
||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
type: exec
|
type: exec
|
||||||
name: deploy
|
name: deploy
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Run image
|
- name: Make
|
||||||
commands:
|
commands:
|
||||||
- docker run --name docs -p 8000:8000 -d git.lulzette.ru/lulzette/geeksstuffwiki:latest
|
- make
|
||||||
|
|
||||||
trigger:
|
|
||||||
event:
|
|
||||||
- promote
|
|
||||||
target:
|
|
||||||
- production
|
|
||||||
node:
|
node:
|
||||||
target: geeksstuffwiki
|
target: geeksstuffwiki
|
||||||
depends_on:
|
|
||||||
- build image
|
|
@ -1,6 +0,0 @@
|
|||||||
FROM alpine:3.16.3
|
|
||||||
RUN apk update && apk add py-pip make
|
|
||||||
COPY . /app
|
|
||||||
RUN cd /app && make prepare && make build
|
|
||||||
CMD [ "/app/docker-entry.sh" ]
|
|
||||||
EXPOSE 8000
|
|
11
Makefile
11
Makefile
@ -1,4 +1,9 @@
|
|||||||
all: build serve
|
all: build serve
|
||||||
|
|
||||||
|
local_build: prepare build upload_to_srv clean
|
||||||
|
|
||||||
|
drone_build: prepare build copy_to_dir unprepare clean
|
||||||
|
|
||||||
build:
|
build:
|
||||||
mkdocs build
|
mkdocs build
|
||||||
clean:
|
clean:
|
||||||
@ -9,6 +14,10 @@ unprepare:
|
|||||||
pip uninstall mkdocs mkdocs-windmill-dark
|
pip uninstall mkdocs mkdocs-windmill-dark
|
||||||
serve:
|
serve:
|
||||||
mkdocs serve
|
mkdocs serve
|
||||||
upload: prepare build upload_to_srv clean
|
|
||||||
upload_to_srv:
|
upload_to_srv:
|
||||||
rsync -a -P --delete `pwd`/site/ geekwiki:/srv/http/
|
rsync -a -P --delete `pwd`/site/ geekwiki:/srv/http/
|
||||||
|
|
||||||
|
copy_to_dir:
|
||||||
|
cp -r /srv/http /srv/http_${DRONE_BUILD_NUMBER}
|
||||||
|
rsync -a -P --delete `pwd`/site/ /srv/http/
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
cd /app
|
|
||||||
mkdocs serve
|
|
Loading…
Reference in New Issue
Block a user