Skip to content

Commit

Permalink
Fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
nenad0707 committed Jun 4, 2024
1 parent ffc2945 commit 64d187a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,25 +22,24 @@ jobs:
- name: Set up .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: "8.0.x" # Ili verzija koju koristite
dotnet-version: "8.0.x" # Or the version you are using
- name: Restore dependencies
run: dotnet restore ./TaskTackler
env:
ApiUrl: ${{ secrets.API_URL }} # Osigurajte da je API_URL tajna vrednost postavljena
- name: Set API_URL in appsettings.json
run: |
echo "Setting API_URL in appsettings.json"
jq --arg apiUrl "${{ secrets.API_URL }}" '.ApiUrl = $apiUrl' ./TaskTackler/wwwroot/appsettings.json > ./TaskTackler/wwwroot/appsettings.tmp.json
mv ./TaskTackler/wwwroot/appsettings.tmp.json ./TaskTackler/wwwroot/appsettings.json
- name: Build
run: dotnet build --configuration Release --no-restore ./TaskTackler
env:
ApiUrl: ${{ secrets.API_URL }} # Dodajte ovu liniju
- name: Deploy
uses: Azure/static-web-apps-deploy@v1
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN }}
repo_token: ${{ secrets.GITHUB_TOKEN }} # Used for Github integrations (i.e. PR comments)
repo_token: ${{ secrets.GITHUB_TOKEN }} # Used for GitHub integrations (i.e., PR comments)
action: "upload"
app_location: "./TaskTackler" # App source code path
output_location: "wwwroot" # Built app content directory - optional
env:
ApiUrl: ${{ secrets.API_URL }}

close_pull_request_job:
if: github.event_name == 'pull_request' && github.event.action == 'closed'
Expand Down
2 changes: 1 addition & 1 deletion TaskTackler/wwwroot/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
}
},
"AllowedHosts": "*",
"ApiUrl": "https://localhost:7213/api/"
"ApiUrl": ""
}

0 comments on commit 64d187a

Please sign in to comment.