2023-08-12 17:46:43 +02:00
|
|
|
when:
|
|
|
|
path: "web/**"
|
2023-07-20 14:30:45 +02:00
|
|
|
steps:
|
2023-08-12 22:17:56 +02:00
|
|
|
build-web:
|
2023-07-20 14:30:45 +02:00
|
|
|
image: ruby:latest
|
|
|
|
commands:
|
|
|
|
- cd web && bundle && bundle exec jekyll build
|
2023-08-12 22:17:56 +02:00
|
|
|
preview-web:
|
2023-08-12 18:03:44 +02:00
|
|
|
image: woodpeckerci/plugin-surge-preview
|
|
|
|
when:
|
|
|
|
event: pull_request
|
|
|
|
settings:
|
|
|
|
path: web/_site
|
|
|
|
surge_token:
|
|
|
|
from_secret: surge_token
|
|
|
|
forge_type: github
|
|
|
|
forge_url: https://github.com
|
|
|
|
forge_repo_token:
|
|
|
|
from_secret: github_token
|
2023-08-12 22:17:56 +02:00
|
|
|
deploy-web:
|
2023-07-20 14:30:45 +02:00
|
|
|
image: debian:latest
|
|
|
|
when:
|
|
|
|
- event: [push, manual]
|
|
|
|
branch: main
|
|
|
|
commands:
|
|
|
|
- rm -rfv /var/www/tinylifegame/*
|
|
|
|
- cp -rv web/_site/. /var/www/tinylifegame
|
|
|
|
volumes:
|
|
|
|
- /var/www/tinylifegame:/var/www/tinylifegame
|