Skip to content

Update main.yml

Update main.yml #35

Workflow file for this run

name: deployment
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install nvm
run: |
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
- name: Install Node.js 16.20.2
run: |
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
nvm install 16.2.0
- name: Install Node.js 16.20.2
run: |
nvm install 16.20.2
- name: Set up Node.js version
uses: actions/setup-node@v2
with:
node-version: '18'
- name: build app
run: |
#npm cache clean --force #*try clearing out npm cache*
#npm install --legacy-peer-deps #*run the command with the --legacy-peer-deps option*
#npm install --force #* run the command with the --force*
#npm install
#npm run build
yarn
yarn run build
- name: Deploy WebApp to Static Web App
uses: Azure/static-web-apps-deploy@v1
with:
azure_static_web_apps_api_token: ${{ secrets.MANAGE_DEPLOYMENT_TOKEN }}
action: 'upload'
#app_location: 'auth-app'
#api_location: ''
output_location: './dist'