change key #19
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
# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy | ||
# More GitHub Actions for Azure: https://github.com/Azure/actions | ||
name: Build and deploy Node.js app to Azure Web App - KobraStocksocksFrontEnd-Web | ||
on: | ||
push: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
env: | ||
AZURE_WEBAPP_NAME: 'KobraStocksFrontend' # set this to your application's name | ||
AZURE_WEBAPP_PACKAGE_PATH: './client' # set this to the path to your web app project, defaults to the repository root | ||
NODE_VERSION: '20.x' # set this to the node version to use | ||
jobs: | ||
build-and-deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: 'Checkout GitHub Action' | ||
uses: actions/checkout@v4 | ||
- name: Login to Azure | ||
uses: azure/login@v1 | ||
with: | ||
creds: ${{ secrets.AZURE_CREDENTIALS_KOBRASTOCKS }} | ||
- name: Setup Node ${{ env.NODE_VERSION }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
- name: 'npm install, build, and test' | ||
run: | | ||
npm install | ||
npm run build --if-present | ||
npm run test --if-present | ||
working-directory: ${{ env.AZURE_WEBAPP_PACKAGE_PATH }} | ||
- name: 'Deploy to Azure Web App' | ||
uses: azure/webapps-deploy@v2 | ||
with: | ||
app-name: ${{ env.AZURE_WEBAPP_NAME }} | ||
package: ./client | ||
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_77CAF60E9BEB4121A2C915FE333B9DB1 }} | ||
- name: Logout | ||
run: | | ||
az logout | ||