diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 5e597903..63433a38 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -19,18 +19,15 @@ jobs: - uses: actions/checkout@v4 - name: Install dependencies - run: nix develop --command composer install + run: ./run ci:install - name: Run tests - run: nix develop --command ./run test --testdox --colors=always + run: ./run ci:test - name: Generate the website run: | - nix develop --command ./run generate + ./run ci:build tree output_prod - env: - APP_ENV: prod - NODE_ENV: production - name: Install the deploy key and known hosts run: | diff --git a/run.local b/run.local index a09bde14..3051f0d1 100755 --- a/run.local +++ b/run.local @@ -1,5 +1,17 @@ #!/usr/bin/env bash +function ci:build { + APP_ENV=prod nix develop --command ./run generate +} + +function ci:install { + nix develop --command composer install +} + +function ci:test { + nix develop --command ./run test --testdox --colors=always +} + function clean { rm -fr output_*/ source/build/ }