unable to connect static pages web app to bitbucket account

Ron Eggler 0 Reputation points
2024-08-28T16:08:46.23+00:00

Hi,

I followed the instructions on https://video2.skills-academy.com/en-us/azure/static-web-apps/bitbucket?tabs=vanilla-javascript to setup a static web app and hook it up to a bitbucket repository I created (I did not import any code from GitHub as indicated in the instructions).

Now, I created, I created a directory structure that looks like:

.  
├── app │    
|       └── index.html  
├── bitbucket-pipelines.yml  
└── README.md

and put the following in my bitbucket-pipelines.yml:

`

 pipelines:
branches:
main:
step:
name: Deploy to test
deployment: test
script:
chown -R 165536:165536 $BITBUCKET_CLONE_DIR
pipe: microsoft/azure-static-web-apps-deploy:main
variables:
APP_LOCATION: '/app'
OUTPUT_LOCATION: '/'
API_TOKEN: $deployment_token

yet, the pipeline keeps failing with the following error:

App Directory Location: '/app' is invalid. Could not detect this directory. Please verify your deployment configuration file reflects your repository structure.

I tried to remove the leading slash but then the error simply changes to:

App Directory Location: 'app' is invalid. Could not detect this directory. Please verify your deployment configuration file reflects your repository structure.

I tried the same with a trailing slash, also:

App Directory Location: 'app/' is invalid. Could not detect this directory. Please verify your deployment configuration file reflects your repository structure.

and when I click on the dynamic link in Azure, I just get the default page: Congratulations on your new site!Your site will be ready soon—please check back later.

Recommended next steps:

the contents of my app/index.html re just:

<h1>
    HELLO WORLD!
</h1>

What's going on why does the pipeline not succeed?

Azure Static Web Apps
Azure Static Web Apps
An Azure service that provides streamlined full-stack web app development.
902 questions
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.