Skip to content

Create front_kobrastocks.yml #1

Create front_kobrastocks.yml

Create front_kobrastocks.yml #1

# 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: |

Check failure on line 49 in .github/workflows/front_kobrastocks.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/front_kobrastocks.yml

Invalid workflow file

You have an error in your yaml syntax on line 49
az logout