Skip to content

Commit

Permalink
attempting to fix deployment working directory issue (should deploy p…
Browse files Browse the repository at this point in the history
…okecopilot-client instead of repository root
  • Loading branch information
rjwignar committed Jun 26, 2024
1 parent fad5562 commit cf2c718
Showing 1 changed file with 20 additions and 16 deletions.
36 changes: 20 additions & 16 deletions .github/workflows/main_dge4d54qzwwy2du-web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,21 @@ jobs:
- name: Set up Node.js version
uses: actions/setup-node@v3
with:
node-version: '20.x'
node-version: "20.x"

- name: npm install, build, and test
run: |
cd pokecopilot-client
npm install
npm run build --if-present
npm run test --if-present
working-directory: ./pokecopilot-client

- name: Zip artifact for deployment
run: zip release.zip ./* -r
run: |
cd pokecopilot-client
zip -r ../release.zip .
working-directory: ./pokecopilot-client

- name: Upload artifact for deployment job
uses: actions/upload-artifact@v3
Expand All @@ -40,10 +45,10 @@ jobs:
runs-on: ubuntu-latest
needs: build
environment:
name: 'Production'
name: "Production"
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}
permissions:
id-token: write #This is required for requesting the JWT
permissions:
id-token: write #This is required for requesting the JWT

steps:
- name: Download artifact from build job
Expand All @@ -53,19 +58,18 @@ jobs:

- name: Unzip artifact for deployment
run: unzip release.zip

- name: Login to Azure
uses: azure/login@v1
with:
client-id: ${{ secrets.AZUREAPPSERVICE_CLIENTID_A4A5642C7164431EB00B077EAB4C0314 }}
tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_8F033F3A78CD4067AB94B38DE4B3C64C }}
subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_42F9FB4EACE248FA98D5803AAAD07C9E }}

- name: 'Deploy to Azure Web App'
- name: Login to Azure
uses: azure/login@v1
with:
client-id: ${{ secrets.AZUREAPPSERVICE_CLIENTID_A4A5642C7164431EB00B077EAB4C0314 }}
tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_8F033F3A78CD4067AB94B38DE4B3C64C }}
subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_42F9FB4EACE248FA98D5803AAAD07C9E }}

- name: "Deploy to Azure Web App"
id: deploy-to-webapp
uses: azure/webapps-deploy@v2
with:
app-name: 'dge4d54qzwwy2du-web'
slot-name: 'Production'
app-name: "dge4d54qzwwy2du-web"
slot-name: "Production"
package: .

0 comments on commit cf2c718

Please sign in to comment.