The solution, it seems, is to add uses
:
trigger: none
resources:
repositories:
- repository: WikiGit
type: git
name: [Project name].wiki
jobs:
- job:
uses: # This will not checkout the repo to the agent, but will add the repo to the agent PAT
repositories:
- WikiGit
steps:
- script: |
az devops wiki show --wiki "[Project name].wiki" --verbose
az devops wiki page create --path NewPage --wiki "[Project name].wiki" --comment "added a new page" --content "# New Wiki Page Created!" --verbose
env:
AZURE_DEVOPS_EXT_PAT: $(System.AccessToken)
Thanks to this Visual Sudio Developer Community answer.