This repository has been archived by the owner on Feb 27, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Simplify CI due to netlify
- Loading branch information
1 parent
26eeed0
commit 05f93e6
Showing
4 changed files
with
4 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 not shown.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 = []; } |