Skip to content

Commit

Permalink
Adds Github CI/CD workflow.
Browse files Browse the repository at this point in the history
  • Loading branch information
emaadgh committed May 13, 2024
1 parent f52c828 commit c4f3674
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/liara.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: MyBook-CI/CD

env:
DOTNET_VERSION: '8'

on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout source code
uses: actions/checkout@v3

- name: Setup dotnet
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}

- name: Restore packages
run: dotnet restore MyBook

- name: Build
run: dotnet build MyBook --no-restore

- name: Run tests
run: dotnet test MyBook.Test --no-build --verbosity normal
deploy:
runs-on: ubuntu-latest

steps:
- 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 --app="mybook" --api-token="$LIARA_TOKEN" --no-app-logs --port 80

0 comments on commit c4f3674

Please sign in to comment.