From 5dd1cec0ce991e4daad307210eb906389fd9dd4f Mon Sep 17 00:00:00 2001 From: Martin Bryant Date: Sat, 24 Feb 2024 10:54:29 +0000 Subject: [PATCH 1/4] Remove deploy working directory --- .github/workflows/deploy.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index d8a22f82..8906de3b 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -18,11 +18,9 @@ jobs: dotnet-version: 8.0.x - name: Restore tools - working-directory: ./update run: dotnet tool restore - name: Test - working-directory: ./update run: dotnet run devopstests - name: Build @@ -35,5 +33,4 @@ jobs: creds: ${{ secrets.AZURE_CREDENTIALS }} - name: Deploy - working-directory: ./update run: dotnet run azure From 8e5a389b81b0d297b18dd3857c7119833950cfde Mon Sep 17 00:00:00 2001 From: Martin Bryant Date: Sat, 24 Feb 2024 10:56:45 +0000 Subject: [PATCH 2/4] Missed one --- .github/workflows/deploy.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 8906de3b..6246a754 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -24,7 +24,6 @@ jobs: run: dotnet run devopstests - name: Build - working-directory: ./update run: dotnet run bundle - name: Azure Login From 0e418f5c22d42ac989da8ecee8690a5bbc0d3694 Mon Sep 17 00:00:00 2001 From: Martin Bryant Date: Mon, 26 Feb 2024 09:40:47 +0000 Subject: [PATCH 3/4] renaming on wishlist module so it compiles on build machine --- src/Client/Client.fsproj | 2 +- src/Client/Index.fs | 10 +++++----- src/Client/pages/WishList.fs | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Client/Client.fsproj b/src/Client/Client.fsproj index 01347186..06a4c64b 100644 --- a/src/Client/Client.fsproj +++ b/src/Client/Client.fsproj @@ -15,7 +15,7 @@ - + diff --git a/src/Client/Index.fs b/src/Client/Index.fs index 936476d0..5e7fc662 100644 --- a/src/Client/Index.fs +++ b/src/Client/Index.fs @@ -12,7 +12,7 @@ open Shared type PageTab = | Home of Home.Model | Login of Login.Model - | Wishlist of Wishlist.Model + | Wishlist of WishList.Model | NotFound type User = @@ -24,7 +24,7 @@ type Model = { Page: PageTab; User: User } type Msg = | HomePageMsg of Home.Msg | LoginPageMsg of Login.Msg - | WishlistMsg of Wishlist.Msg + | WishlistMsg of WishList.Msg | UrlChanged of string list | OnSessionChange | Logout @@ -68,7 +68,7 @@ let initFromUrl model url = match model.User with | User user -> let wishlistModel, wishlistMsg = - Wishlist.init (wishListApi user.Token) user.UserName + WishList.init (wishListApi user.Token) user.UserName let model = { Page = Wishlist wishlistModel @@ -110,7 +110,7 @@ let update msg model = | User data -> data.Token | Guest -> "" - let newModel, cmd = Wishlist.update (wishListApi token) wishlistMsg wishlistModel + let newModel, cmd = WishList.update (wishListApi token) wishlistMsg wishlistModel { Page = Wishlist newModel @@ -179,7 +179,7 @@ let view model dispatch = match model.Page with | Home homeModel -> Home.view homeModel (HomePageMsg >> dispatch) | Login loginModel -> Login.view loginModel (LoginPageMsg >> dispatch) - | Wishlist wishlistModel -> Wishlist.view wishlistModel (WishlistMsg >> dispatch) + | Wishlist wishlistModel -> WishList.view wishlistModel (WishlistMsg >> dispatch) | NotFound -> Html.div [ prop.text "Not Found" ] ] ] diff --git a/src/Client/pages/WishList.fs b/src/Client/pages/WishList.fs index 60a8896a..4c09f93e 100644 --- a/src/Client/pages/WishList.fs +++ b/src/Client/pages/WishList.fs @@ -1,4 +1,4 @@ -module Page.Wishlist +module Page.WishList open System open Elmish From 313a49f068d2ac58890b8a22806597815b4f2ff8 Mon Sep 17 00:00:00 2001 From: Martin Bryant Date: Mon, 26 Feb 2024 10:56:03 +0000 Subject: [PATCH 4/4] change deploy to be on release published --- .github/workflows/deploy.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 6246a754..5044bf3f 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,9 +1,8 @@ name: Safe Bookstore deploy on: - push: - branches: - - master + release: + types: [published] jobs: deploy: @@ -11,12 +10,12 @@ jobs: steps: - uses: actions/checkout@v4 - + - name: Setup .NET uses: actions/setup-dotnet@v3 with: dotnet-version: 8.0.x - + - name: Restore tools run: dotnet tool restore