diff --git a/.woodpecker/main.yml b/.woodpecker/main.yml new file mode 100644 index 0000000..a587c76 --- /dev/null +++ b/.woodpecker/main.yml @@ -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 diff --git a/Jenkinsfile b/Jenkinsfile deleted file mode 100644 index b8f5e29..0000000 --- a/Jenkinsfile +++ /dev/null @@ -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/' - } - } - } -}