So we actually figured it out. Turns out the deploy command checks if your in a continuous integration (CI) environment (like GitHub Actions) and if your not, it falls back to user login. It does this by looking at environment variables (specifically the “CI” variable) and Azure DevOps Pipelines is not one of the supported CIs nor does it set the “CI” variable. Thus, the deploy command is unable to recognize in ADO, it’s inside a CI.
To fix this simply set the “CI” environment variable to something truthy.
- script: |
npx shopify hydrogen deploy --token $(SHOPIFY_HYDROGEN_DEPLOYMENT_TOKEN)
displayName: Build and Publish to Oxygen
workingDirectory: click-and-collect-storefront
env:
CI: true