This repository uses GitHub Actions to automatically deploy the documentation website to the production server when changes are pushed to the main branch.
The following secrets need to be added to the GitHub repository settings (Settings > Secrets and variables > Actions > New repository secret):
SSH_HOSTNAME: The hostname to copy files overSSH_USERNAME: The username for SSH access to the serverSSH_PRIVATE_KEY: The SSH private key for authentication
The deployment workflow:
- Triggers on push to main branch
- Sets up Node.js environment
- Installs dependencies
- Builds the documentation site
- Deploys the built files to {SSH_HOSTNAME}:/www/klokku-website/docs using SCP
- Generate an SSH key pair if you don't have one:
ssh-keygen -t ed25519 -C "github-actions-deploy" - Add the public key to the authorized_keys file on the server
- Add the private key to GitHub repository secrets as
SSH_PRIVATE_KEY - Add the username for SSH access to GitHub repository secrets as
SSH_USERNAME