forked from codeyu/mini-mvvm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
51 lines (48 loc) · 1.75 KB
/
appveyor.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
init:
- git config --global core.autocrlf false
version: '{build}'
environment:
matrix:
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
nodejs_version: "8"
access_token:
secure: gPLaCoISbGAJCbPE7vGAEkRMtiDH17XvyEzweZlp8pt6zjsOCTMZlmd1296tzgcz
git_email:
secure: dCEJcIf4jXWH0PrQcRaXuvvT8l7C5GwosxOsmi0c564=
# Start builds on tags only (GitHub and BitBucket)
# skip_non_tags: true
pull_requests:
do_not_increment_build_number: true
branches:
only:
- master
# Install scripts. (runs after repo cloning)
install:
# - copy C:\MinGW\bin\mingw32-make.exe C:\MinGW\bin\make.exe
# - set PATH=%PATH%;C:\MinGW\bin
# - ps: $env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User")
# - ps: [Environment]::SetEnvironmentVariable("Path", "$env:Path;c:\Users\Me\AppData\Roaming\npm\", "User")
# Get the latest stable version of Node.js or io.js
- ps: Install-Product node $env:nodejs_version
# install modules
- npm install
build_script:
# run webpack with production flag
- npm run build
test: off
on_success:
# - gh-pages deploy
- git config --global credential.helper store
- ps: Add-Content "$env:USERPROFILE\.git-credentials" "https://$($env:access_token):x-oauth-basic@github.com`n"
- git config --global user.email "$($env:git_email)"
- git config --global user.name "codeyu"
- git config --global core.autocrlf true
- git clone "https://github.com/codeyu/mini-mvvm.git" gh-pages
- cd gh-pages
- git checkout -b gh-pages
- ps: if (-not $?) { throw "Cloning gh-pages failed" }
- ps: Remove-Item * -Recurse
- ps: Copy-Item ..\dist\* . -Recurse
- git add --all .
- git commit -m "update dist"
- git push -f origin gh-pages