update azure pipelines
This commit is contained in:
parent
b14e6ce255
commit
a1dd024714
5 changed files with 50 additions and 55 deletions
|
@ -6,40 +6,34 @@ trigger:
|
||||||
pr: none
|
pr: none
|
||||||
|
|
||||||
pool:
|
pool:
|
||||||
vmImage: 'windows-latest'
|
vmImage: "windows-latest"
|
||||||
|
|
||||||
variables:
|
|
||||||
pushChanges: 'No'
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- task: PowerShell@2
|
- task: PowerShell@2
|
||||||
displayName: 'Update archives'
|
displayName: "Update archives"
|
||||||
inputs:
|
inputs:
|
||||||
targetType: 'filePath'
|
targetType: "filePath"
|
||||||
filePath: './update_archives.azure.ps1'
|
filePath: "./update_archives.azure.ps1"
|
||||||
failOnStderr: true
|
failOnStderr: true
|
||||||
workingDirectory: '.'
|
workingDirectory: $(Build.SourcesDirectory)
|
||||||
- task: PowerShell@2
|
- task: NodeTool@0
|
||||||
displayName: 'Commit changes'
|
displayName: "Setup node 12.x"
|
||||||
condition: and(succeeded(), eq(variables.pushChanges, 'Yes'))
|
inputs:
|
||||||
inputs:
|
versionSpec: "12.x"
|
||||||
targetType: 'inline'
|
- task: PowerShell@2
|
||||||
script: '$ErrorActionPreference = "Stop";
|
displayName: "Create Build"
|
||||||
git config --local user.name "BotPatty";
|
inputs:
|
||||||
git config --local user.email "ci@zint.ch";
|
targetType: "filePath"
|
||||||
git add ./files/GCMCodes.zip;
|
filePath: "./build.azure.ps1"
|
||||||
git add ./files/DolphinCodes.zip;
|
failOnStderr: true
|
||||||
git commit -m "update archives [skip ci]";'
|
workingDirectory: $(Build.SourcesDirectory)
|
||||||
failOnStderr: true
|
- task: PowerShell@2
|
||||||
workingDirectory: '.'
|
displayName: "Push Changes"
|
||||||
- task: PowerShell@2
|
condition: succeeded()
|
||||||
displayName: 'Push Changes'
|
env:
|
||||||
condition: and(succeeded(), eq(variables.pushChanges, 'Yes'))
|
GitHub_PAT: $(GitHub_PAT)
|
||||||
env:
|
inputs:
|
||||||
GitHub_PAT: $(GitHub_PAT)
|
targetType: "inline"
|
||||||
inputs:
|
script: "git push -uqf $(GitHub_PAT) HEAD:gh-pages;"
|
||||||
targetType: 'inline'
|
failOnStderr: true
|
||||||
script: '$ErrorActionPreference = "Stop";
|
workingDirectory: $(Build.SourcesDirectory)/docs/.vuepress/dist
|
||||||
git push -q $(GitHub_PAT) HEAD:master;'
|
|
||||||
failOnStderr: true
|
|
||||||
workingDirectory: '.'
|
|
||||||
|
|
20
build.azure.ps1
Normal file
20
build.azure.ps1
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
$ErrorActionPreference = "Stop";
|
||||||
|
|
||||||
|
Write-Host -ForegroundColor Blue "Ensuring yarn is installed..";
|
||||||
|
npm i -g yarn;
|
||||||
|
|
||||||
|
Write-Host -ForegroundColor Blue "Installing dependencies..";
|
||||||
|
yarn;
|
||||||
|
|
||||||
|
Write-Host -ForegroundColor Blue "Creating new build..";
|
||||||
|
yarn build;
|
||||||
|
|
||||||
|
Write-Host -ForegroundColor Blue "Initializing git repository";
|
||||||
|
git config --local user.name "BotPatty";
|
||||||
|
git config --local user.email "ci@zint.ch";
|
||||||
|
$Remote = (git remote get-url origin);
|
||||||
|
Set-Location "./docs/.vuepress/dist";
|
||||||
|
git init;
|
||||||
|
git remote add origin $Remote;
|
||||||
|
git add .;
|
||||||
|
git commit -m "auto-deployment";
|
16
dna.js
16
dna.js
|
@ -1,16 +0,0 @@
|
||||||
var _paq = window._paq || [];
|
|
||||||
_paq.push(["disableCookies"]),
|
|
||||||
_paq.push(["trackPageView"]),
|
|
||||||
_paq.push(["enableLinkTracking"]),
|
|
||||||
(function() {
|
|
||||||
var e = "//dna.zint.ch/";
|
|
||||||
_paq.push(["setTrackerUrl", e + "pdna"]), _paq.push(["setSiteId", "2"]);
|
|
||||||
var a = document,
|
|
||||||
t = a.createElement("script"),
|
|
||||||
p = a.getElementsByTagName("script")[0];
|
|
||||||
(t.type = "text/javascript"),
|
|
||||||
(t.async = !0),
|
|
||||||
(t.defer = !0),
|
|
||||||
(t.src = e + "jdna"),
|
|
||||||
p.parentNode.insertBefore(t, p);
|
|
||||||
})();
|
|
|
@ -93,7 +93,4 @@ Write-Host -ForegroundColor Green "Dolphin Archive rebuilt";
|
||||||
Write-Host "Cleaning up..";
|
Write-Host "Cleaning up..";
|
||||||
Set-Location ..;
|
Set-Location ..;
|
||||||
Remove-Item "./.build" -Recurse;
|
Remove-Item "./.build" -Recurse;
|
||||||
Write-Host -ForegroundColor Green "Done";
|
Write-Host -ForegroundColor Green "Done";
|
||||||
|
|
||||||
# Set Azure variable to commit and push changes
|
|
||||||
Write-Host "##vso[task.setvariable variable=pushChanges;]Yes"
|
|
Loading…
Reference in a new issue