-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Adds Github CI/CD workflow on master branch.
- Changes database connection string path because the cloud platform we use for deployment does not support the previous path.
- Loading branch information
Showing
2 changed files
with
45 additions
and
1 deletion.
There are no files selected for viewing
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
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.sln | ||
|
||
- name: Build | ||
run: dotnet build MyBook.sln --no-restore | ||
|
||
- name: Run tests | ||
run: dotnet test MyBook.sln --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 |
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