diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml new file mode 100644 index 00000000..52c5be89 --- /dev/null +++ b/.github/workflows/main.yaml @@ -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 diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml deleted file mode 100644 index ba559213..00000000 --- a/.github/workflows/test.yaml +++ /dev/null @@ -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