2024-01-14 22:12:07 +01:00
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
|
|
build-publish:
|
|
|
|
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: '8.0.x'
|
|
|
|
- name: Setup Java
|
|
|
|
uses: actions/setup-java@v4
|
|
|
|
with:
|
|
|
|
java-version: '17'
|
|
|
|
distribution: 'temurin'
|
|
|
|
- name: Setup Android SDK
|
|
|
|
uses: android-actions/setup-android@v3
|
|
|
|
- name: Restore tools
|
|
|
|
run: dotnet tool restore
|
|
|
|
- name: Run cake
|
|
|
|
uses: coactions/setup-xvfb@v1
|
|
|
|
with:
|
2024-04-05 10:58:50 +02:00
|
|
|
run: dotnet cake --target Publish --ref ${{ github.ref }} --buildNum ${{ github.run_number }}
|
2024-01-14 22:12:07 +01:00
|
|
|
env:
|
2024-01-14 22:29:53 +01:00
|
|
|
NUGET_KEY: ${{ secrets.NUGET_KEY }}
|
|
|
|
BAGET_KEY: ${{ secrets.BAGET_KEY }}
|
2024-01-14 22:12:07 +01:00
|
|
|
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: '8.0.x'
|
|
|
|
- name: Restore tools
|
|
|
|
run: dotnet tool restore
|
|
|
|
- name: Run cake
|
2024-04-05 10:58:50 +02:00
|
|
|
run: dotnet cake --target Document --ref ${{ github.ref }} --buildNum ${{ github.run_number }}
|
2024-01-14 22:12:07 +01:00
|
|
|
- name: Deploy
|
2024-04-05 10:51:12 +02:00
|
|
|
if: startsWith(github.ref, 'refs/tags/')
|
2024-01-14 22:12:07 +01:00
|
|
|
# this is a beautiful way to deploy a website and i will not take any criticism
|
|
|
|
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/MLEM
|