-1

Here is my pipelines bitbucket-pipelines.yml

image: atlassian/default-image:latest

options:
  docker: true
  size: 2x

pipelines:
  branches:
    dev:
      - step:
          name: Deploy to test
          deployment: test
          caches:
            - node
          script:
            - pipe: microsoft/azure-static-web-apps-deploy:main
              variables:
                APP_LOCATION: "$BITBUCKET_CLONE_DIR/"
                OUTPUT_LOCATION: "$BITBUCKET_CLONE_DIR/web-build"
                API_TOKEN: $deployment_token
                APP_BUILD_COMMAND: npx expo export:web

definitions:
  services:
    docker:
      memory: 4096

The error message was: EACCES: permission denied, mkdir '/root/.config/devcert' - Click to preview the error

I tried to create artifacts first then make the deployment via microsoft/azure-static-web-apps-deploy:main pipe, but it did not work too.

image: node:16-alpine

options:
  docker: true
  size: 2x

pipelines:
  branches:
    dev:
      - step:
          name: Build and Test
          caches:
            - node
          script:
            - npm install yarn
            - yarn
            - npx expo export:web
          artifacts:
            - web-build/**
      - step:
          name: Deploy to test
          deployment: test
          script:
            - pipe: microsoft/azure-static-web-apps-deploy:main
              variables:
                APP_LOCATION: "$BITBUCKET_CLONE_DIR/"
                OUTPUT_LOCATION: "$BITBUCKET_CLONE_DIR/web-build"
                API_TOKEN: $deployment_token
                SKIP_APP_BUILD: "true"

definitions:
  services:
    docker:
      memory: 4096

The error message was: Failed to find a default file in the app artifacts folder (opt/atlassian/pipelines/agent/build/). Valid default files: index.html,Index.html. - Click to preview the error

Youcef
  • 1
  • 1
  • Please do NOT use images to paste source code nor logs https://meta.stackoverflow.com/a/285557/11715259 – N1ngu Aug 24 '23 at 12:24

1 Answers1

0

I suggest the following steps:

Azure Account Setup: Azure Static Web Apps Resource: Repository Configuration: Azure Static Web Apps Configuration: Build Configuration: GitHub Actions or Azure Pipelines: CI/CD Configuration: Secrets and Environment Variables: Trigger Deployment: Monitor Deployment: Debugging: Iterate and Refine:

Since you're using Bitbucket instead of GitHub, some steps might differ slightly due to differences in CI/CD systems. Be sure to consult the Azure Static Web Apps documentation for Bitbucket integration and explore Azure Pipelines documentation for setting up CI/CD for Bitbucket repositories.