switch to github actions for workflows #6
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: https://github.com/actions/setup-dotnet@v3 | |
with: | |
dotnet-version: '8.0.x' | |
- name: Setup Android SDK | |
uses: android-actions/setup-android@v3 | |
- name: Restore | |
run: dotnet tool restore | |
- name: Run cake | |
uses: coactions/setup-xvfb@v1 | |
with: | |
run: dotnet cake --target Publish --branch $GITHUB_REF_NAME | |
env: | |
nuget_key: ${{ secrets.NUGET_KEY }} | |
baget_key: ${{ secrets.BAGET_KEY }} | |
docs: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Setup .NET | |
uses: https://github.com/actions/setup-dotnet@v3 | |
with: | |
dotnet-version: '8.0.x' | |
- name: Run cake | |
run: dotnet cake --target Document --branch $GITHUB_REF_NAME | |
- name: Deploy | |
if: github.event_name == 'push' && github.ref_name == 'release' | |
# 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/. [email protected]:/var/www/MLEM |