Skip to content

Commit

Permalink
Merge pull request #1 from ErialdoDFreitas/azure-pipelines
Browse files Browse the repository at this point in the history
Set up CI with Azure Pipelines
  • Loading branch information
ErialdoDFreitas authored Jun 20, 2024
2 parents 3caffbc + 6c63a24 commit d78c550
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Node.js with React
# Build a Node.js project that uses React (adpated to Nextjs).
# Add steps that analyze code, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/javascript

trigger:
- main

pool:
vmImage: ubuntu-latest

steps:
- task: NodeTool@0
inputs:
versionSpec: '14.x' # Atualize para a versão mais recente do Node.js
displayName: 'Install Node.js'

- script: |
npm install
npm run build
displayName: 'npm install and build'

- task: CopyFiles@2
displayName: 'Copy build output to artifact staging directory'
inputs:
SourceFolder: '$(System.DefaultWorkingDirectory)/build' # Atualize o caminho para a pasta de saída do build
Contents: '**/*'
TargetFolder: '$(Build.ArtifactStagingDirectory)'

- task: ArchiveFiles@2
displayName: 'Archive build artifacts'
inputs:
rootFolderOrFile: '$(Build.ArtifactStagingDirectory)'
includeRootFolder: false
archiveType: zip
archiveFile: $(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip
replaceExistingArchive: true

- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: 'drop'
publishLocation: 'Container'

0 comments on commit d78c550

Please sign in to comment.