diff --git a/.github/workflows/liara-deploy.yml b/.github/workflows/liara-deploy.yml new file mode 100644 index 0000000..9ee86d9 --- /dev/null +++ b/.github/workflows/liara-deploy.yml @@ -0,0 +1,38 @@ +name: Shortener +env: + DOTNET_VERSION: '7' +'on': + push: + branches: + - main +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: 🚚 Get latest code + uses: actions/checkout@v4 + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: '${{ env.DOTNET_VERSION }}' + - name: Restore Nuget packages + run: dotnet restore + - name: Build + run: dotnet build --no-restore + - name: Test + run: dotnet test --no-build --verbosity normal + + deploy: + runs-on: ubuntu-latest + steps: + - name: 🚚 Get latest code + uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: "18" + - name: update-liara + env: + LIARA_TOKEN: ${{ secrets.LIARA_API_TOKEN }} + run: | + npm i -g @liara/cli@5 + liara deploy --api-token="$LIARA_TOKEN" --no-app-logs