1.3 KiB
1.3 KiB
GitHub Staging Deploy
This repository deploys the internal branch to the staging server 154.12.35.103 with GitHub Actions.
Required GitHub secrets
STAGING_SSH_USER: SSH user for154.12.35.103.STAGING_SSH_KEY: Private SSH key that can log in to the staging server.STAGING_SSH_PORT: SSH port. Use22if the server uses the default port.GHCR_USERNAME: Optional. Required only if the GHCR package is private and the server needs to log in before pulling.GHCR_TOKEN: Optional. A GitHub PAT withread:packagesfor private GHCR pulls.
Server requirements
- Docker and either
docker composeordocker-composeare installed. - The deployment directory is
/opt/hifast-server. - Runtime files already exist beside
docker-compose.cloud.yml, especiallyconfigs/ppanel.yaml,logs/,cache/,loki/,grafana/,prometheus/, andtempo/.
What the workflow does
- Builds the Docker image for
linux/amd64. - Pushes
ghcr.io/tawcorp/hifast-server:<commit-sha>andghcr.io/tawcorp/hifast-server:staging. - Copies
docker-compose.cloud.ymlto the staging server. - Pulls the immutable commit image and restarts
ppanel-server. - Checks
http://127.0.0.1:8080/v1/common/heartbeat. - Attempts rollback to the previous container image if the health check fails.