Update GitHub Actions to build the website
This commit is contained in:
parent
c06bc12467
commit
e53cb3a50a
33
.github/workflows/main.yaml
vendored
Normal file
33
.github/workflows/main.yaml
vendored
Normal 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
|
22
.github/workflows/test.yaml
vendored
22
.github/workflows/test.yaml
vendored
|
@ -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
|
Loading…
Reference in a new issue