i have a angular application that i want to be deployed on azure static web apps via git hub actions.
On my local machine:
angular cli 17
node 20
npm 10
This is the yaml file.
name: Azure Static Web Apps CI/CD
on:
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened, closed]
branches:
- master
jobs:
build_and_deploy_job:
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed')
runs-on: ubuntu-latest
name: Build and Deploy Job
steps:
- uses: actions/setup-node@v4
with:
node-version: '18'
- uses: actions/checkout@v4
with:
sub-modules: true
- name: Build And Deploy
id: builddeploy
uses: Azure/static-web-apps-deploy@v1
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_VICTORIOUS_DESERT_030B8CE03 }}
repo_token: ${{ secrets.GITHUB_TOKEN }} # Used for Github integrations (i.e. PR comments)
action: "upload"
###### Repository/Build Configurations - These values can be configured to match your app requirements. ######
# For more information regarding Static Web App workflow configurations, please visit:
https://aka.ms/swaworkflowconfig
/>
app_location: "/" # App source code path
api_location: "api" # Api source code path - optional
output_location: "dist/sun-club" # Built app content directory - optional
###### End of Repository/Build Configurations ######
close_pull_request_job:
if: github.event_name == 'pull_request' && github.event.action == 'closed'
runs-on: ubuntu-latest
name: Close Pull Request Job
steps:
- name: Close Pull Request
id: closepullrequest
uses: Azure/static-web-apps-deploy@v1
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_VICTORIOUS_DESERT_030B8CE03 }}
action: "close"
I am stuck with this error.
Node.js version v16.20.2 detected.
The Angular CLI requires a minimum Node.js version of v18.13.
I have tried to update the node version with a command from the yaml file but it seems that node 16 is default.
I tried to update the node version using nvm but no success.
Deploy angular app to static web app on azure
Programing Coderfunda
December 29, 2023
No comments
Related Posts:
Pines: An Alpine and Tailwind UI LibraryPines UI is an Alpine and Tailwind UI Library by Tony Lea. Pines is a library of animations, sliders, tooltips, accordions, modals, and more! The p… Read More
Canvas - not drawing at correct positionI have a canvas wrapped in dialog element and I have implemented a drawing app so I can draw something on canvas but it's not drawing on correct posit… Read More
ModuleNotFoundError: No module named '_psutil_osx'When I wanted to import '_psutil_osx' ,Error happend. This is the clause import _psutil_osx and the error Traceback (most recent call last): Fil… Read More
Generate Code in Laravel with SynthThe Synth package for Laravel that helps you generate code and perform various tasks in your Laravel application. The post Generate Code in Laravel… Read More
Raw Query Output With Bindings is Coming to Laravel 10Laravel 10 is getting a long-awaited feature to get the raw SQL query, including bindings. The post Raw Query Output With Bindings is Coming to Lar… Read More
0 comments:
Post a Comment
Thanks