Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploy via Azure DevOps #289

Closed
sonphnt opened this issue Jan 10, 2024 · 4 comments
Closed

Deploy via Azure DevOps #289

sonphnt opened this issue Jan 10, 2024 · 4 comments

Comments

@sonphnt
Copy link

sonphnt commented Jan 10, 2024

Hi, Has anyone deployed successfully by using Azure DevOps pipeline with yml file?

Thanks a lot.

@n3662
Copy link

n3662 commented Jan 15, 2024

@sonphnt

Here is the yml file for our devops Pipeline

# Node.js with React
# Build a Node.js project that uses React.
# Add steps that analyze code, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/javascript

resources:
  pipelines:
    - pipeline: Azure Chat GPT-CI # Name of the pipeline resource.
      source: Azure Chat GPT-CI # The name of the pipeline referenced by this pipeline resource.
      trigger: true

pool:
  vmImage: ubuntu-latest

steps:
  - task: NodeTool@0
    inputs:
      versionSpec: "18.x"
    displayName: "Install Node.js"

  - script: |
      cd ./src
      npm install
      npm run build
      cd ..
      cp -R ./src/.next/standalone ./site-deploy
      cp -R ./src/.next/static ./site-deploy/.next/static
      cp -R ./src/public ./site-deploy/public
      cd ./site-deploy
      zip Nextjs-site.zip ./* .next -qr
    displayName: "yarn install and build"

  - task: AzureRmWebAppDeployment@4
    inputs:
      ConnectionType: "AzureRM"
      azureSubscription: "azure-sub-connection"
      appType: "webAppLinux"
      WebAppName: "your-web-app"
      packageForLinux: "$(System.DefaultWorkingDirectory)/**/*.zip"
      RuntimeStack: "NODE|18-lts"

@The-Denno
Copy link

Hello :)

where is this yaml from? Where can I find the referenced "Azure Chat GPT-CI" Pipeline?

Thank you

@sonphnt
Copy link
Author

sonphnt commented Jan 29, 2024

@n3662 Thanks. This is what I was looking for.

@sonphnt
Copy link
Author

sonphnt commented Jan 29, 2024

@The-Denno You can add a new file "azure-pipelines.yml" with the body above and select it when setting up a pipeline in Azure Devops

@sonphnt sonphnt closed this as completed Jan 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants