2022-08-27 21:31:32 +05:30
|
|
|
pipeline:
|
|
|
|
build:
|
|
|
|
when:
|
|
|
|
event: [push, pull_request]
|
|
|
|
image: node:bullseye-slim
|
|
|
|
commands:
|
|
|
|
- npm install
|
|
|
|
- npm run build
|
|
|
|
- pwd
|
|
|
|
- mv build/ ../
|
|
|
|
- rm -rf *
|
|
|
|
- mv ../build/* .
|
|
|
|
push:
|
|
|
|
when:
|
|
|
|
event: [push]
|
|
|
|
image: appleboy/drone-git-push
|
|
|
|
settings:
|
|
|
|
branch: build
|
|
|
|
remote: git@git.projectsegfau.lt:ProjectSegfault/website.git
|
|
|
|
force: true
|
|
|
|
commit: true
|
|
|
|
commit_message: Successfully built the page.
|
|
|
|
ssh_key:
|
|
|
|
from_secret: ssh_key_git
|
|
|
|
update:
|
|
|
|
when:
|
|
|
|
event: [push]
|
|
|
|
image: appleboy/drone-ssh
|
|
|
|
settings:
|
|
|
|
host:
|
|
|
|
- projectsegfau.lt
|
|
|
|
username: gitea
|
|
|
|
key:
|
|
|
|
from_secret: ssh_key
|
|
|
|
port: 6665
|
|
|
|
command_timeout: 1m
|
|
|
|
script:
|
|
|
|
- cd /var/www/
|
|
|
|
- rm -rf html
|
2022-08-27 21:36:10 +05:30
|
|
|
- git clone -b build https://github.com/ProjectSegfault/website.git html
|
2022-08-27 21:31:32 +05:30
|
|
|
- cd html
|
|
|
|
# I HATE GIT AND HOW THEY FORCE THIS
|
|
|
|
# todo: do the funny pull but find a way to accept the changes.
|
|
|
|
branches: main
|