mirror of
https://github.com/Ellpeck/TinyLifeWeb.git
synced 2024-12-22 06:39:23 +01:00
added woodpecker build
This commit is contained in:
parent
54e17968b5
commit
204578396c
2 changed files with 29 additions and 40 deletions
29
.woodpecker/main.yml
Normal file
29
.woodpecker/main.yml
Normal file
|
@ -0,0 +1,29 @@
|
|||
steps:
|
||||
build-web:
|
||||
image: ruby:latest
|
||||
commands:
|
||||
- cd web && bundle && bundle exec jekyll build
|
||||
build-docs:
|
||||
image: mcr.microsoft.com/dotnet/sdk:7.0.305
|
||||
commands:
|
||||
- cd docs && dotnet tool restore && dotnet docfx
|
||||
deploy-web:
|
||||
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
|
||||
deploy-docs:
|
||||
image: debian:latest
|
||||
when:
|
||||
- event: [push, manual]
|
||||
branch: main
|
||||
commands:
|
||||
- rm -rfv /var/www/tinylifedocs/*
|
||||
- cp -rv docs/_site/. /var/www/tinylifedocs
|
||||
volumes:
|
||||
- /var/www/tinylifedocs:/var/www/tinylifedocs
|
40
Jenkinsfile
vendored
40
Jenkinsfile
vendored
|
@ -1,40 +0,0 @@
|
|||
pipeline {
|
||||
agent none
|
||||
stages {
|
||||
stage('Build') {
|
||||
agent any
|
||||
stages {
|
||||
stage('Site') {
|
||||
steps {
|
||||
sh '''cd web
|
||||
bundle
|
||||
bundle exec jekyll build'''
|
||||
stash includes: "web/_site/**", name: "site"
|
||||
}
|
||||
}
|
||||
stage('Docs') {
|
||||
steps {
|
||||
sh '''cd docs
|
||||
dotnet tool restore
|
||||
dotnet docfx'''
|
||||
stash includes: "docs/_site/**", name: "docs"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Publish') {
|
||||
when { branch 'main' }
|
||||
agent { label 'web' }
|
||||
options { skipDefaultCheckout() }
|
||||
steps {
|
||||
unstash 'site'
|
||||
sh 'rm -rf /var/www/tinylifegame/*'
|
||||
sh 'cp -r web/_site/. /var/www/tinylifegame/'
|
||||
|
||||
unstash 'docs'
|
||||
sh 'rm -rf /var/www/tinylifedocs/*'
|
||||
sh 'cp -r docs/_site/. /var/www/tinylifedocs/'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue