2022-08-10 23:31:20 +05:30
|
|
|
pipeline:
|
|
|
|
build:
|
|
|
|
image: node:bullseye-slim
|
|
|
|
commands:
|
|
|
|
- npm install
|
|
|
|
- npm run build
|
2022-08-11 05:30:31 +05:30
|
|
|
- pwd
|
|
|
|
- mv build/ ../
|
|
|
|
- rm -rf *
|
|
|
|
- mv ../build/* .
|
2022-08-11 18:22:43 +05:30
|
|
|
|
2022-08-11 18:21:30 +05:30
|
|
|
push: image: appleboy/drone-git-push
|
2022-08-11 05:30:31 +05:30
|
|
|
settings:
|
|
|
|
branch: build
|
2022-08-11 05:40:19 +05:30
|
|
|
remote: git@git.projectsegfau.lt:ProjectSegfault/website.git
|
2022-08-11 18:06:03 +05:30
|
|
|
force: true
|
2022-08-11 05:30:31 +05:30
|
|
|
commit: true
|
2022-08-11 05:43:25 +05:30
|
|
|
commit_message : Successfully built the page.
|
2022-08-11 05:30:31 +05:30
|
|
|
ssh_key:
|
|
|
|
from_secret: ssh_key_git
|
2022-08-11 18:24:56 +05:30
|
|
|
#when:
|
|
|
|
#event: [push, tag, deployement]
|
2022-08-11 05:30:31 +05:30
|
|
|
update:
|
2022-08-10 23:31:20 +05:30
|
|
|
image: appleboy/drone-ssh
|
|
|
|
settings:
|
|
|
|
host:
|
2022-08-10 23:48:55 +05:30
|
|
|
- projectsegfau.lt
|
2022-08-11 17:47:55 +05:30
|
|
|
username: gitea
|
2022-08-10 23:56:14 +05:30
|
|
|
key:
|
2022-08-11 05:30:31 +05:30
|
|
|
from_secret: ssh_key
|
2022-08-10 23:48:55 +05:30
|
|
|
port: 6665
|
2022-08-10 23:31:20 +05:30
|
|
|
command_timeout: 1m
|
|
|
|
script:
|
2022-08-11 18:09:07 +05:30
|
|
|
- cd /var/www/
|
2022-08-11 18:06:03 +05:30
|
|
|
- rm -rf html
|
|
|
|
- git clone https://git.projectsegfau.lt/ProjectSegfault/website.git html
|
|
|
|
- cd html
|
|
|
|
- git checkout build
|
2022-08-11 18:24:56 +05:30
|
|
|
#when:
|
|
|
|
#event: [push, tag, deployement]
|
2022-08-11 18:06:03 +05:30
|
|
|
# I HATE GIT AND HOW THEY FORCE THIS
|
|
|
|
# todo: do the funny pull but find a way to accept the changes.
|
2022-08-11 18:13:22 +05:30
|
|
|
branches: main
|