Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
126 lines (114 sloc) 4.14 KB
environment:
access_token:
# EDIT the encrypted version of your GitHub access token
secure: qy4AqVCB780JU08gAz1Zs9Nk6pL940FklM5m5F7AwXG9MC6mEmGImsIRbpkqd68z
install:
- git submodule update --init --recursive
- mkdir ..\Wyam
- mkdir ..\output
- mkdir ..\ghpages
# Fetch the latest version of Wyam
- "curl -s https://raw.githubusercontent.com/Wyamio/Wyam/master/RELEASE -o ..\\Wyam\\wyamversion.txt"
- set /P WYAMVERSION=< ..\Wyam\wyamversion.txt
- echo %WYAMVERSION%
- echo %EXTRACOMMANDOPTIONS%
- echo push to branch %PUSHTOBRANCH%
# Get and unzip the latest version of Wyam
- ps: Start-FileDownload "https://github.com/Wyamio/Wyam/releases/download/$env:WYAMVERSION/Wyam-$env:WYAMVERSION.zip" -FileName "..\Wyam\Wyam.zip"
- 7z x ..\Wyam\Wyam.zip -o..\Wyam -r
build_script:
# run once to generate output for gh-pages
- dotnet ..\Wyam\Wyam.dll -s LinkRoot="/BigDoorWyamBlog"
- xcopy output ..\ghpages /Esy
- ls output
# run once to generate output for netlify
- dotnet ..\Wyam\Wyam.dll
- xcopy output ..\output /Esy
- ls output
# now run to produce artifacts which will be deployed to website/blog folder
- dotnet ..\Wyam\Wyam.dll %EXTRACOMMANDOPTIONS%
- pwd
- ls
- ls ..\output
artifacts:
- path: 'blog\**\*.*'
name: blog
notifications:
- provider: Email
to:
- mark.burton@noknok.pl
on_build_success: true
on_build_failure: true
on_build_status_changed: true
# changed github webhooks to not run on pull requests to make this easier
# https://github.com/appveyor/ci/issues/1636
# here we are going to override common configuration
for:
# override settings for `master` branch
-
version: 1.0.{build}
branches:
only:
- master
deploy:
- provider: Environment
name: BigDoorLiveBlog
on:
branch: master
environment:
PUSHTOBRANCH: gh-pages
EXTRACOMMANDOPTIONS: -s LinkRoot="/blog" -o blog
on_success:
# Switch branches to gh-pages, clean the folder, copy everything in from the Wyam output, and commit/push
# See http://www.appveyor.com/docs/how-to/git-push for more info
- git config --global credential.helper store
# EDIT your Git email and name
- git config --global user.email $env:op_build_user_email
- git config --global user.name $env:op_build_user
- ps: Add-Content "$env:USERPROFILE\.git-credentials" "https://$($env:access_token):x-oauth-basic@github.com`n"
- git checkout %PUSHTOBRANCH%
- git rm -rf .
- ls
- ls blog
- ls ..\ghpages
- xcopy ..\ghpages . /E
# EDIT your domain name or remove if not using a custom domain
#- echo wyam.io > CNAME
# EDIT the origin of your repository - have to reset it here because AppVeyor pulls from SSH, but GitHub won't accept SSH pushes
- git remote set-url origin https://github.com/NokNokMLS/BigDoorWyamBlog.git
- git add -A
- git commit -a -m "Commit from AppVeyor"
- git push
# override settings for `cms*` branches
-
branches:
only:
- /cms.*/
deploy:
- provider: Environment
name: BigDoorTestBlog
on:
branch: /cms.*/
environment:
PUSHTOBRANCH: gh-pages-staging
EXTRACOMMANDOPTIONS: -s LinkRoot="/blog" -o blog
on_success:
# Switch branches to gh-pages, clean the folder, copy everything in from the Wyam output, and commit/push
# See http://www.appveyor.com/docs/how-to/git-push for more info
- git config --global credential.helper store
# EDIT your Git email and name
- git config --global user.email $env:op_build_user_email
- git config --global user.name $env:op_build_user
- ps: Add-Content "$env:USERPROFILE\.git-credentials" "https://$($env:access_token):x-oauth-basic@github.com`n"
- git checkout %PUSHTOBRANCH%
- git rm -rf .
- ls
- ls ..\output
- xcopy ..\output . /E
# EDIT your domain name or remove if not using a custom domain
#- echo wyam.io > CNAME
# EDIT the origin of your repository - have to reset it here because AppVeyor pulls from SSH, but GitHub won't accept SSH pushes
- git remote set-url origin https://github.com/NokNokMLS/BigDoorWyamBlog.git
- git add -A
- git commit -a -m "Commit from AppVeyor"
- git push