Commit 47ee02c5 authored by Paul 🐻's avatar Paul 🐻

deploy: revoke old deploy_key and deploy only necessary files

parent 79bbecc6
Pipeline #7958158 passed with stages
in 2 minutes and 47 seconds
......@@ -17,5 +17,5 @@
# Ignore .DS_store file
\ No newline at end of file
......@@ -4,10 +4,10 @@ install:
- bundle exec middleman build --clean
- openssl aes-256-cbc -K $encrypted_cd32eca6684a_key -iv $encrypted_cd32eca6684a_iv -in deploy_key.pem.enc -out deploy_key.pem -d
- openssl aes-256-cbc -K $encrypted_cd32eca6684a_key -iv $encrypted_cd32eca6684a_iv -in deploy_travis.pem.enc -out deploy_travis.pem -d
- eval "$(ssh-agent -s)"
- chmod 600 deploy_key.pem
- ssh-add deploy_key.pem
- chmod 600 deploy_travis.pem
- ssh-add deploy_travis.pem
skip_cleanup: true
provider: script
#!/bin/bash -e
# Commit middleman build directory
git clean -dfx -e public -e deploy_key.pem
mv public/* .
git clean -dfx -e public -e deploy_travis.pem
cd public && ls -la
git init
git add .
git config --global ""
git config --global "Deploy bot"
git commit -m "deploy: publishing github pages $(date)"
# Push to gh-pages branch!
git remote set-url origin $ssh_repo
git remote add origin $ssh_repo
git push -f origin HEAD:master
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment