language: node_js node_js: - "stable" # S: Build Lifecycle install: - npm install #before_script: # - npm install -g gulp script: - hexo generate after_script: # Git Config - mkdir ${GH_REPO_NAME} - cd ${GH_REPO_NAME} - git init - git config user.name "sujunmin" - git config user.email "sujunmin@gmail.com" - git config core.sparseCheckout true # Checkout blog only - git remote add -f origin "https://${GH_REF}" - echo "blog/" >> .git/info/sparse-checkout - git pull origin master # Refresh blog data - cp -rf ../public/* blog/ # Git push - sed -i 's/.Net"/Net"/g' blog/archives/index.html - git add . - git commit -am "Update Docs" - git push "https://${GH_TOKEN}@${GH_REF}" master:master # E: Build LifeCycle branches: only: - blog-source env: global: - GH_REF: github.com/sujunmin/sujunmin.github.com.git - GH_REPO_NAME: sujunmin.github.com