Tidy repo
This commit is contained in:
parent
9a3c837373
commit
9e8306bbe3
27
.travis.yml
27
.travis.yml
|
@ -1,27 +0,0 @@
|
|||
language: php
|
||||
php: 7
|
||||
sudo: true
|
||||
|
||||
branches:
|
||||
only:
|
||||
- source
|
||||
|
||||
cache:
|
||||
directories:
|
||||
- $HOME/.composer/cache
|
||||
- $HOME/.yarn-cache
|
||||
|
||||
before_install:
|
||||
- openssl aes-256-cbc -K $encrypted_01701315b81b_key -iv $encrypted_01701315b81b_iv -in deploy_key.enc -out deploy_key -d
|
||||
- chmod 600 deploy_key
|
||||
- eval `ssh-agent -s`
|
||||
- ssh-add deploy_key
|
||||
- yarn --pure-lockfile
|
||||
- composer install --prefer-dist --no-dev
|
||||
|
||||
script: ./publish.sh
|
||||
|
||||
env:
|
||||
global:
|
||||
- ENCRYPTION_LABEL: 01701315b81b
|
||||
- COMMIT_AUTHOR_EMAIL: "oliver@oliverdavies.uk"
|
|
@ -7,16 +7,18 @@
|
|||
},
|
||||
"require": {
|
||||
"php": "^5.5|^7.0",
|
||||
"behat/mink-extension": "@stable",
|
||||
"behat/mink-goutte-driver": "@stable",
|
||||
"dflydev/embedded-composer": "^1.0@dev",
|
||||
"mavimo/sculpin-redirect-bundle": "@dev",
|
||||
"opdavies/sculpin-content-generator-bundle": "@stable",
|
||||
"opdavies/sculpin-gist-embed-bundle": "^0.1",
|
||||
"opdavies/sculpin-twig-markdown-bundle": "^0.1",
|
||||
"sculpin/sculpin": "^2.1@dev",
|
||||
"tsphethean/sculpin-related-posts-bundle": "~0.1.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"behat/mink-extension": "@stable",
|
||||
"behat/mink-goutte-driver": "@stable",
|
||||
"opdavies/sculpin-content-generator-bundle": "@stable"
|
||||
},
|
||||
"config": {
|
||||
"sort-packages": true
|
||||
}
|
||||
|
|
BIN
deploy_key.enc
BIN
deploy_key.enc
Binary file not shown.
30
publish.sh
30
publish.sh
|
@ -1,30 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
SITE_ENV="prod"
|
||||
REPO=`git config remote.origin.url`
|
||||
SSH_REPO=${REPO/https:\/\/github.com\//git@github.com:}
|
||||
SHA=`git rev-parse --verify HEAD`
|
||||
BUILD_DIR="_deploy"
|
||||
|
||||
# Prepare the build directory.
|
||||
git clone $REPO $BUILD_DIR
|
||||
pushd $BUILD_DIR
|
||||
git checkout master || git checkout --orphan master
|
||||
popd
|
||||
rm -rf ${BUILD_DIR}/**/* || exit 0
|
||||
|
||||
# Re-generate the site.
|
||||
node_modules/.bin/gulp --production
|
||||
vendor/bin/sculpin generate --no-interaction --clean --env=prod
|
||||
touch output_prod/.nojekyll
|
||||
|
||||
# Add, commit and push the changes.
|
||||
pushd $BUILD_DIR
|
||||
mv ../output_prod/* .
|
||||
git config --local user.email oliver@oliverdavies.uk
|
||||
git add -A .
|
||||
git commit -m "Re-generate site: $SHA"
|
||||
git push $SSH_REPO master
|
||||
popd
|
|
@ -1 +0,0 @@
|
|||
www.oliverdavies.uk
|
Loading…
Reference in a new issue