Skip to content

Commit

Permalink
Update azure-pipelines-1.yml for Azure Pipelines
Browse files Browse the repository at this point in the history
  • Loading branch information
NissesSenap committed Jul 26, 2019
1 parent 0a66fea commit c2a84eb
Showing 1 changed file with 21 additions and 10 deletions.
31 changes: 21 additions & 10 deletions azure-pipelines-1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,26 @@ steps:

- bash: |
git submodule update --init --recursive
pwd
ls -la
./hugo -t hugo-coder -d docs
displayName: "Add submodule and run hugo"

- bash: |
git config --local user.name "Azure Pipelines"
git config --local user.email "[email protected]"
git status
git add docs
git commit -m "CD after merge in blog branch $(date)"
git log
git show
displayName: "Git commit and push"

git commit -m "CD after merge in blog branch $(date) ***NO_CI***"
displayName: "Add submodule, run hugo and commit"

- task: DownloadSecureFile@1
inputs:
secureFile: blog_rsa
displayName: 'Get the deploy key'

- script: |
mkdir ~/.ssh && mv $DOWNLOADSECUREFILE_SECUREFILEPATH ~/.ssh/id_rsa
chmod 700 ~/.ssh && chmod 600 ~/.ssh/id_rsa
ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts
git remote set-url --push origin [email protected]:NissesSenap/blog.git
git push origin HEAD:master
displayName: 'Publish GitHub Pages'
condition: |
and(not(eq(variables['Build.Reason'], 'PullRequest')),
eq(variables['Build.SourceBranch'], 'refs/heads/master'))

0 comments on commit c2a84eb

Please sign in to comment.