Skip to content

Commit

Permalink
Merge branch 'srht_build_nix'
Browse files Browse the repository at this point in the history
  • Loading branch information
tetov committed Jan 31, 2024
2 parents 1069db9 + 2bbfbfc commit deaedb6
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 70 deletions.
41 changes: 17 additions & 24 deletions .build.yml
Original file line number Diff line number Diff line change
@@ -1,40 +1,33 @@
---
image: fedora/39
image: nixos/latest
oauth: pages.sr.ht/PAGES:RW
packages:
- tar
- hut
- chromium # for puppeter
- composer

sources:
- https://github.com/nvm-sh/nvm.git

environment:
NIX_CONFIG: "experimental-features = nix-command flakes"
SITE: tetov.se
PUBLISH_REF: refs/heads/main

tasks:
- nvm: |
cd nvm
git checkout `git describe --abbrev=0 --tags --match "v[0-9]*" $(git rev-list --tags --max-count=1)`
- install: |
cd tetov.se
nix develop --command npm ci
- test: |
cd tetov.se
nix develop --command npm test
- build: |
. nvm/nvm.sh
cd tetov.se
nvm install
nvm use
npm ci
npm test
npm run build
nix develop --command npm run build
tar -C public -cvz . > ../site.tar.gz
- publish: >
test "$GIT_REF" = "$PUBLISH_REF" &&
hut pages publish
-d "$SITE"
--site-config tetov.se/srht_site_config.json
site.tar.gz
- publish: |
if [ "$GIT_REF" = "$PUBLISH_REF" ] ; then
cd tetov.se
nix develop --command hut pages publish -d "$SITE" ../site.tar.gz --site-config srht_site_config.json
else
echo 'Not publishing, because $GIT_REF != $PUBLISH_REF'
fi
triggers:
- action: email
Expand Down
15 changes: 0 additions & 15 deletions .github/workflows/auto-merge.yml

This file was deleted.

30 changes: 0 additions & 30 deletions .github/workflows/test-regressions.yml

This file was deleted.

10 changes: 9 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,15 @@
# module parameters provide easy access to attributes of the same
# system.
devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [nodejs_20 pre-commit chromium];
buildInputs = with pkgs; [
chromium
hut
nodejs_20
php
phpPackages.composer
pre-commit
vips
];
shellHook = ''
${pkgs.pre-commit}/bin/pre-commit install
export PUPPETEER_SKIP_DOWNLOAD=true
Expand Down

0 comments on commit deaedb6

Please sign in to comment.