mirror of
https://github.com/ProjectSegfault/website.git
synced 2024-11-23 00:22:59 +05:30
44 lines
1.1 KiB
YAML
44 lines
1.1 KiB
YAML
pipeline:
|
|
build:
|
|
image: node:bullseye-slim
|
|
commands:
|
|
- npm install
|
|
- npm run build
|
|
- pwd
|
|
- mv build/ ../
|
|
- rm -rf *
|
|
- mv ../build/* .
|
|
|
|
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
|
|
#when:
|
|
#event: [push, tag, deployement]
|
|
update:
|
|
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
|
|
- git clone https://git.projectsegfau.lt/ProjectSegfault/website.git html
|
|
- cd html
|
|
- git checkout build
|
|
#when:
|
|
#event: [push, tag, deployement]
|
|
# I HATE GIT AND HOW THEY FORCE THIS
|
|
# todo: do the funny pull but find a way to accept the changes.
|
|
branches: main
|