website/.woodpecker.yml

44 lines
1.1 KiB
YAML
Raw Normal View History

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