Azure Devops Pipeline and Deploy to Netlify

Deploying a Pelican static site generator via ADO


trigger:
- dev

variables:
- group: group1
- name: configuration
  value: release
- name: platform
  value: x64

pool:
  vmImage: ubuntu-latest

strategy:
  matrix:
    Python310:
      python.version: '3.10'

steps:
- task: UsePythonVersion@0
  inputs:
    versionSpec: '$(python.version)'
  displayName: 'Use Python $(python.version)'

- script: |
    python -m pip install --upgrade pip
    pip install -r requirements.txt
  displayName: 'Install dependencies'

- script: |
    pelican content
  displayName: 'Build Site'


- task: CopyFiles@2
  displayName: 'Copy Files to: $(Build.ArtifactStagingDirectory)'
  inputs:
       SourceFolder: 'output'
       TargetFolder: '$(Build.ArtifactStagingDirectory)'

- task: PublishBuildArtifacts@1
  displayName: 'Publish Artifact: output'
  inputs:
        pathtoPublish: '$(Build.ArtifactStagingDirectory)'
        artifactName: 'output'
- task: deploy@1
  inputs:
    authToken: $(netlifyAccessToken)
    siteId: $(netlifySiteId)
    sourceDirectory: '$(Build.ArtifactStagingDirectory)'
    isValidationOnly: false
    message: 'deployed to netlify'