Skip to content
This repository has been archived by the owner on Feb 27, 2024. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
Simplify CI due to netlify
  • Loading branch information
domenkozar committed Feb 21, 2019
1 parent 26eeed0 commit 05f93e6
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 72 deletions.
63 changes: 0 additions & 63 deletions .travis.yml
@@ -1,68 +1,5 @@
language: nix
branches:
only:
- master
- production

before_install:
- if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then
openssl aes-256-cbc -K $encrypted_88bda2ae685f_key -iv $encrypted_88bda2ae685f_iv -in deploy_rsa.enc -out deploy_rsa -d;
eval "$(ssh-agent -s)";
chmod 600 $TRAVIS_BUILD_DIR/deploy_rsa;
ssh-add $TRAVIS_BUILD_DIR/deploy_rsa;
fi

script:
- if [ "$TRAVIS_PULL_REQUEST" = "false" -a "$TRAVIS_BRANCH" = "master" ]; then
echo "SITEURL = 'http://weekly.nixos.org'" >> pelicanconf.py;
echo "WITH_FUTURE_DATES = True" >> pelicanconf.py;
fi
- nix-build -Q default.nix;

after_success:
- env
- git clone git@github.com:NixOS/nixos-weekly.git gh-pages -b gh-pages
- if [ "$TRAVIS_PULL_REQUEST" = "false" -a "$TRAVIS_BRANCH" = "master" ]; then
mkdir -p gh-pages/preview;
rm -rf gh-pages/preview/*;
cp -RL result/* gh-pages/preview/;
cd gh-pages;
git add .;
if [[ -n `git diff --cached --exit-code` ]]; then
echo "= git status =============================================";
git status;
echo "= git commit =============================================";
git config user.name 'NixOS Weekly Robot';
git config user.email 'weekly@nixos.org';
git commit -a -m "Preview of '$TRAVIS_COMMIT' commit built by Travis-CI \\#$((TRAVIS_JOB_ID - 1))";
git push git@github.com:NixOS/nixos-weekly.git HEAD:gh-pages;
else
echo "==========================================================";
echo "No changes. Nothing to commit";
echo "==========================================================";
fi
fi;
- if [ "$TRAVIS_PULL_REQUEST" = "false" -a "$TRAVIS_BRANCH" = "production" ]; then
mv gh-pages/preview tmp-preview;
mv gh-pages/CNAME tmp-CNAME;
rm -rf gh-pages/*;
cp -RL result/* gh-pages/;
mv tmp-preview gh-pages/preview;
mv tmp-CNAME gh-pages/CNAME;
cd gh-pages;
touch .nojekyll;
git add .;
if [[ -n `git diff --cached --exit-code` ]]; then
echo "= git status =============================================";
git status;
echo "= git commit =============================================";
git config user.name "NixOS Weekly Robot";
git config user.email "weekly@nixos.org";
git commit -a -m "Release of $TRAVIS_TAG (commit '$TRAVIS_COMMIT') built by Travis-CI \\#$((TRAVIS_JOB_ID - 1))";
git push git@github.com:NixOS/nixos-weekly.git HEAD:gh-pages;
else
echo "==========================================================";
echo "No changes. Nothing to commit";
echo "==========================================================";
fi
fi;
Binary file removed deploy_rsa.enc
Binary file not shown.
1 change: 0 additions & 1 deletion deploy_rsa.pub

This file was deleted.

12 changes: 4 additions & 8 deletions nixpkgs.nix
@@ -1,9 +1,5 @@
let
fetchTarball = { url, sha256 }@attrs:
if builtins.lessThan builtins.nixVersion "1.12"
then builtins.fetchTarball { inherit url; }
else builtins.fetchTarball attrs;
in import (fetchTarball {
url = "https://github.com/NixOS/nixpkgs/archive/b619e0b016c5c79920aa06b78ccf936e56eaf45d.tar.gz";
sha256 = "1bvnw9dvcbm69s9xbb2npx42zns6zq7jwang8d865pnzb0clf5sv";
# to update: $ nix-prefetch-url --unpack url
import (builtins.fetchTarball {
url = "https://github.com/NixOS/nixpkgs/archive/39e3248141eb2f778ef5adc7643eb36094416974.tar.gz";
sha256 = "17l5fjpkhsr70z6p43k9b1g7flxkvcv3azwqqjsc666s44sgiw9j";
}) { config = {}; overlays = []; }

0 comments on commit 05f93e6

Please sign in to comment.