webcompile/.woodpecker.yml

46 lines
1.3 KiB
YAML
Raw Normal View History

2022-08-10 23:31:20 +05:30
pipeline:
2022-08-13 03:54:05 +05:30
build:
when:
event: [push, pull_request]
2022-08-12 16:45:39 +05:30
image: node:bullseye-slim
commands:
- npm install
- npm run build
- pwd
- mv build/ ../
- rm -rf *
- mv ../build/* .
push:
2022-08-13 03:54:05 +05:30
when:
event: [push]
2022-08-12 16:45:39 +05:30
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:
2022-08-13 03:54:05 +05:30
when:
event: [push]
2022-08-12 16:45:39 +05:30
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
# I HATE GIT AND HOW THEY FORCE THIS
# todo: do the funny pull but find a way to accept the changes.
branches: main