Skip to content

CI

CI #73

Workflow file for this run

name: CI
on:
workflow_dispatch:
push:
branches:
- main
paths:
- "src/**"
jobs:
go:
name: Test
runs-on: ubuntu-latest
steps:
- name: πŸ›’ Checkout
uses: actions/checkout@v3
- name: ✨ Setup .NET 8
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
- name: 🚚 Restore
run: dotnet restore src
- name: πŸ› οΈ Build
run: dotnet build src --no-restore
- name: πŸ§ͺ Test
run: dotnet test src --no-build
- name: πŸ› οΈ Build Website
run: dotnet publish ./src/LJPcalc.Web --output ./public --configuration Release
- name: πŸ”‘ Load SSH Keys
run: |
install -m 600 -D /dev/null ~/.ssh/id_rsa
echo "${{ secrets.PRIVATE_SSH_KEY }}" > ~/.ssh/id_rsa
- name: πŸš€ Deploy WASM
run: rsync --archive --delete --stats -e 'ssh -p 18765 -o StrictHostKeyChecking=no' './public/wwwroot/_framework/' 'swharden.com@ssh.swharden.com:~/www/swharden.com/public_html/LJPcalc/_framework/'
- name: πŸš€ Deploy index.html
run: rsync -e 'ssh -p 18765 -o StrictHostKeyChecking=no' './public/wwwroot/index.html' 'swharden.com@ssh.swharden.com:~/www/swharden.com/public_html/LJPcalc/index.html'
- name: 🧹 Clear Cache
run: ssh swharden.com@ssh.swharden.com -p 18765 "site-tools-client domain update id=1 flush_cache=1"