mirror of
https://github.com/Ellpeck/TinyLifeWeb.git
synced 2024-11-27 13:28:35 +01:00
Compare commits
15 commits
329a956d8e
...
49922d713b
Author | SHA1 | Date | |
---|---|---|---|
49922d713b | |||
952ad52ce6 | |||
1d93dfd055 | |||
da72f806b4 | |||
99f66ec1a4 | |||
62aa741988 | |||
ff6a532095 | |||
3dbdf3fea0 | |||
76ce7b7826 | |||
f984c72192 | |||
908843b84a | |||
d7bca50207 | |||
3f68ee804b | |||
c504c7b6a1 | |||
37943cd8cc |
4 changed files with 53 additions and 62 deletions
50
.github/workflows/build.yml
vendored
Normal file
50
.github/workflows/build.yml
vendored
Normal file
|
@ -0,0 +1,50 @@
|
||||||
|
on: [push, pull_request]
|
||||||
|
jobs:
|
||||||
|
web:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
BUNDLE_GEMFILE: ${{ github.workspace }}/web/Gemfile
|
||||||
|
steps:
|
||||||
|
- name: Clone repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
|
||||||
|
- name: Setup Ruby
|
||||||
|
uses: ruby/setup-ruby@v1
|
||||||
|
with:
|
||||||
|
ruby-version: 3.2.2
|
||||||
|
bundler-cache: true
|
||||||
|
- name: Build
|
||||||
|
run: cd web && bundle exec jekyll build
|
||||||
|
|
||||||
|
# this is a beautiful way to deploy a website and i will not take any criticism
|
||||||
|
- name: Deploy
|
||||||
|
if: github.event_name == 'push' && github.ref_name == 'main'
|
||||||
|
run: |
|
||||||
|
curl -L --output cloudflared.deb https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64.deb && sudo dpkg -i cloudflared.deb
|
||||||
|
mkdir ~/.ssh && echo "${{ secrets.ELLBOT_KEY }}" > ~/.ssh/id_rsa && chmod 600 ~/.ssh/id_rsa
|
||||||
|
rsync -rv --delete -e 'ssh -o "ProxyCommand cloudflared access ssh --hostname %h" -o "StrictHostKeyChecking=no"' web/_site/. ellbot@ssh.ellpeck.de:/var/www/tinylifegame
|
||||||
|
|
||||||
|
docs:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Clone repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
|
||||||
|
- name: Setup .NET
|
||||||
|
uses: actions/setup-dotnet@v3
|
||||||
|
with:
|
||||||
|
dotnet-version: 7.0.305
|
||||||
|
- name: Build
|
||||||
|
run: cd docs && dotnet tool restore && dotnet docfx
|
||||||
|
|
||||||
|
# this is a beautiful way to deploy a website and i will not take any criticism
|
||||||
|
- name: Deploy
|
||||||
|
if: github.event_name == 'push' && github.ref_name == 'main'
|
||||||
|
run: |
|
||||||
|
curl -L --output cloudflared.deb https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64.deb && sudo dpkg -i cloudflared.deb
|
||||||
|
mkdir ~/.ssh && echo "${{ secrets.ELLBOT_KEY }}" > ~/.ssh/id_rsa && chmod 600 ~/.ssh/id_rsa
|
||||||
|
rsync -rv --delete -e 'ssh -o "ProxyCommand cloudflared access ssh --hostname %h" -o "StrictHostKeyChecking=no"' docs/_site/. ellbot@ssh.ellpeck.de:/var/www/tinylifedocs
|
|
@ -1,33 +0,0 @@
|
||||||
when:
|
|
||||||
path:
|
|
||||||
include:
|
|
||||||
- "docs/**"
|
|
||||||
- "Changelog.md"
|
|
||||||
- "InGameNews.md"
|
|
||||||
steps:
|
|
||||||
build-docs:
|
|
||||||
image: mcr.microsoft.com/dotnet/sdk:7.0.305
|
|
||||||
commands:
|
|
||||||
- cd docs && dotnet tool restore && dotnet docfx
|
|
||||||
preview-docs:
|
|
||||||
image: woodpeckerci/plugin-surge-preview:1.3.0
|
|
||||||
when:
|
|
||||||
event: [pull_request, pull_request_closed]
|
|
||||||
settings:
|
|
||||||
path: docs/_site
|
|
||||||
surge_token:
|
|
||||||
from_secret: surge_token
|
|
||||||
forge_type: github
|
|
||||||
forge_url: https://github.com
|
|
||||||
forge_repo_token:
|
|
||||||
from_secret: github_token
|
|
||||||
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
|
|
|
@ -1,29 +0,0 @@
|
||||||
when:
|
|
||||||
path: "web/**"
|
|
||||||
steps:
|
|
||||||
build-web:
|
|
||||||
image: ruby:3.2.2
|
|
||||||
commands:
|
|
||||||
- cd web && bundle && bundle exec jekyll build
|
|
||||||
preview-web:
|
|
||||||
image: woodpeckerci/plugin-surge-preview:1.3.0
|
|
||||||
when:
|
|
||||||
event: [pull_request, pull_request_closed]
|
|
||||||
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
|
|
||||||
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
|
|
|
@ -64,6 +64,8 @@ GEM
|
||||||
google-protobuf (~> 3.23)
|
google-protobuf (~> 3.23)
|
||||||
sass-embedded (1.63.4-x64-unknown)
|
sass-embedded (1.63.4-x64-unknown)
|
||||||
google-protobuf (~> 3.23)
|
google-protobuf (~> 3.23)
|
||||||
|
sass-embedded (1.63.4-x86_64-linux-gnu)
|
||||||
|
google-protobuf (~> 3.23)
|
||||||
terminal-table (3.0.2)
|
terminal-table (3.0.2)
|
||||||
unicode-display_width (>= 1.1.1, < 3)
|
unicode-display_width (>= 1.1.1, < 3)
|
||||||
unicode-display_width (2.4.2)
|
unicode-display_width (2.4.2)
|
||||||
|
@ -73,6 +75,7 @@ PLATFORMS
|
||||||
x64-mingw-ucrt
|
x64-mingw-ucrt
|
||||||
x64-mingw32
|
x64-mingw32
|
||||||
x64-unknown
|
x64-unknown
|
||||||
|
x86_64-linux
|
||||||
|
|
||||||
DEPENDENCIES
|
DEPENDENCIES
|
||||||
jekyll
|
jekyll
|
||||||
|
|
Loading…
Reference in a new issue