Skip to content

Commit

Permalink
corrected the carrental .yml files
Browse files Browse the repository at this point in the history
  • Loading branch information
kubapoke committed Dec 19, 2024
1 parent 130806f commit bde14c9
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 19 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/carrentfront.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ jobs:
echo "VITE_SERVER_URL=${{ secrets.RENTALFRONT_VITE_SERVER_URL }}" > .env
- name: npm install, build, and test
working-directory: car-rental/frontend/car-rental
run: |
npm install
npm run build --if-present
Expand Down Expand Up @@ -65,5 +66,4 @@ jobs:
app-name: 'carrentemployee'
slot-name: 'Production'
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_2E07AAC139EF446DA244AC632C954B41 }}
package: dist.zip # Point to the zipped package

package: dist.zip # Point to the zipped package
13 changes: 6 additions & 7 deletions .github/workflows/carsearchfronttestbuild.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Test build of Car Search user application
name: Test build of Car Rent employee application

on:
workflow_dispatch:
Expand All @@ -15,11 +15,10 @@ jobs:
with:
node-version: '20.x'

- name: Create .env file for the Car Search Frontend
working-directory: car-search/frontend/car-search
- name: Create .env file for the Car Rent Frontend
working-directory: car-rental/frontend/car-rental
run: |
echo "VITE_CLIENT_ID_FOR_OATH=${{ secrets.SEARCHFRONT_VITE_CLIENT_ID_FOR_OATH }}" > .env
echo "VITE_SERVER_URL=${{ secrets.SEARCHFRONT_VITE_SERVER_URL }}" >> .env
echo "VITE_SERVER_URL=${{ secrets.RENTALFRONT_VITE_SERVER_URL }}" > .env
- name: npm install, build, and test
working-directory: car-rental/frontend/car-rental
Expand All @@ -29,7 +28,7 @@ jobs:
npm run test --if-present
- name: Create a zip file of the dist directory
working-directory: car-search/frontend/car-search
working-directory: car-rental/frontend/car-rental
run: |
echo "Creating a zip file of the dist directory..."
powershell -Command "Compress-Archive -Path dist/* -DestinationPath dist.zip"
Expand All @@ -38,4 +37,4 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: node-app
path: car-search/frontend/car-search/dist.zip
path: car-rental/frontend/car-rental/dist.zip
19 changes: 9 additions & 10 deletions .github/workflows/carsearchfronttestdeploy.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Test build and deployment of Car Search user application
name: Test build and deployment of Car Rent employee application

on:
workflow_dispatch:
Expand All @@ -15,21 +15,20 @@ jobs:
with:
node-version: '20.x'

- name: Create .env file for the Car Search Frontend
- name: Create .env file for the Car Rent Frontend
working-directory: car-rental/frontend/car-rental
run: |
echo "VITE_CLIENT_ID_FOR_OATH=${{ secrets.SEARCHFRONT_VITE_CLIENT_ID_FOR_OATH }}" > .env
echo "VITE_SERVER_URL=${{ secrets.SEARCHFRONT_VITE_SERVER_URL }}" >> .env
echo "VITE_SERVER_URL=${{ secrets.RENTALFRONT_VITE_SERVER_URL }}" > .env
- name: npm install, build, and test
working-directory: car-search/frontend/car-search
working-directory: car-rental/frontend/car-rental
run: |
npm install
npm run build --if-present
npm run test --if-present
- name: Create a zip file of the dist directory
working-directory: car-search/frontend/car-search
working-directory: car-rental/frontend/car-rental
run: |
echo "Creating a zip file of the dist directory..."
powershell -Command "Compress-Archive -Path dist/* -DestinationPath dist.zip"
Expand All @@ -38,7 +37,7 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: node-app
path: car-search/frontend/car-search/dist.zip
path: car-rental/frontend/car-rental/dist.zip

deploy:
runs-on: ubuntu-latest
Expand All @@ -49,15 +48,15 @@ jobs:

steps:
- name: Download artifact from build job
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: node-app

- name: 'Deploy to Azure Web App'
uses: azure/webapps-deploy@v2
uses: azure/webapps-deploy@v3
id: deploy-to-webapp
with:
app-name: 'carsearch'
app-name: 'carrentemployee'
slot-name: 'Production'
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_2E07AAC139EF446DA244AC632C954B41 }}
package: dist.zip # Point to the zipped package

0 comments on commit bde14c9

Please sign in to comment.