Move CI commands into the run file

This commit is contained in:
Oliver Davies 2024-09-12 22:22:49 +01:00
parent 1b5a341c9e
commit 78c181979a
2 changed files with 15 additions and 6 deletions

View file

@ -19,18 +19,15 @@ jobs:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Install dependencies - name: Install dependencies
run: nix develop --command composer install run: ./run ci:install
- name: Run tests - name: Run tests
run: nix develop --command ./run test --testdox --colors=always run: ./run ci:test
- name: Generate the website - name: Generate the website
run: | run: |
nix develop --command ./run generate ./run ci:build
tree output_prod tree output_prod
env:
APP_ENV: prod
NODE_ENV: production
- name: Install the deploy key and known hosts - name: Install the deploy key and known hosts
run: | run: |

View file

@ -1,5 +1,17 @@
#!/usr/bin/env bash #!/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 { function clean {
rm -fr output_*/ source/build/ rm -fr output_*/ source/build/
} }