Update GitHub Actions to build the website

This commit is contained in:
Oliver Davies 2024-09-12 18:19:29 +01:00
parent c06bc12467
commit e53cb3a50a
2 changed files with 33 additions and 22 deletions

33
.github/workflows/main.yaml vendored Normal file
View file

@ -0,0 +1,33 @@
---
name: Build and Deploy
on:
pull_request:
push:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: cachix/install-nix-action@v26
with:
nix_path: nixpkgs=channel:nixos-unstable
- uses: actions/checkout@v4
- name: Install dependencies
run: nix develop --command composer install
- name: Run tests
run: nix develop --command ./run test --testdox --colors=always
- name: Generate the website
run: |
nix develop --command ./run generate
tree output_prod
env:
APP_ENV: prod
NODE_ENV: production

View file

@ -1,22 +0,0 @@
name: Run tests
on:
pull_request:
push:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: cachix/install-nix-action@v26
with:
nix_path: nixpkgs=channel:nixos-unstable
- uses: actions/checkout@v4
- run: |
nix develop -c composer install
nix develop -c ./run test --testdox --colors=always