This is an IHP (Integrated Haskell Platform) project with GitHub Actions for testing and deployment. For more information about IHP, see the IHP Documentation.
This project includes a GitHub Actions workflow for automated testing and deployment. The workflow is defined in .github/workflows/test.yml
.
The workflow is triggered on:
- Push to the
main
branch - Pull requests to the
main
branch - Manual trigger from the GitHub Actions tab
The testing job performs the following steps:
- Checks out the code
- Sets up Nix
- Initializes Cachix for faster builds
- Installs and allows direnv
- Builds generated files
- Starts the project in the background
- Runs the tests
For deployment, follow the IHP Deployment Guide to set up a proper NixOS server for your project.
The deployment job runs after successful tests and only for the main
branch. It performs the following steps:
- Checks out the code
- Sets up SSH for deployment
- Sets up Nix
- Initializes Cachix
- Sets up direnv
- Deploys to a NixOS server
To use the GitHub Actions workflow in this project:
-
Set up the following secrets in your GitHub repository settings:
SSH_HOST
: The hostname or IP address of your deployment serverSSH_USER
: The username for SSH access to the deployment serverSSH_PRIVATE_KEY
: The private SSH key for authentication
-
Modify the
env
section in.github/workflows/test.yml
if needed:- Update
PROJECT_NAME
to match your project - Adjust
ENV
if you want to use a different environment name - Update
NIXPKGS
if you want to use a different Nixpkgs version
- Update
-
Ensure your project has the necessary test files in the
Test
directory. -
If your deployment process differs, modify the
deploy
job in the workflow file accordingly. -
Push your changes to the
main
branch to trigger the workflow.
You can manually trigger the workflow from the Actions tab in your GitHub repository. This is useful for running tests or deploying without pushing changes.
Feel free to customize the workflow file to fit your specific project needs. You may want to add additional steps, change the deployment process, or modify the testing procedure.
For issues related to IHP or this project's setup, please refer to the IHP documentation or seek help on the IHP Forum.
For project-specific issues, please open an issue in this repository.