docs: add github environment setup steps
This commit is contained in:
@@ -202,6 +202,25 @@ In GitHub:
|
||||
- `development`
|
||||
- `production`
|
||||
|
||||
### Exact GitHub UI path
|
||||
1. Open the private repository:
|
||||
- `https://github.com/Bostame/workdock-platform`
|
||||
2. Click:
|
||||
- `Settings`
|
||||
3. In the left sidebar, open:
|
||||
- `Environments`
|
||||
4. Click:
|
||||
- `New environment`
|
||||
5. Create:
|
||||
- `development`
|
||||
6. Repeat and create:
|
||||
- `production`
|
||||
7. Open the `development` environment
|
||||
8. Under `Environment secrets`, click:
|
||||
- `Add environment secret`
|
||||
9. Add each required secret one by one
|
||||
10. Repeat the same pattern later for `production`
|
||||
|
||||
### Development environment secrets
|
||||
Add:
|
||||
- `TEST_DEPLOY_HOST`
|
||||
@@ -217,6 +236,49 @@ Current test values:
|
||||
- `TEST_DEPLOY_PATH=/opt/workdock`
|
||||
- `TEST_DEPLOY_SSH_KEY=<private key that can ssh to root@192.168.2.55>`
|
||||
|
||||
### Development secret entry example
|
||||
Use these exact values in the `development` environment:
|
||||
|
||||
`TEST_DEPLOY_HOST`
|
||||
```text
|
||||
192.168.2.55
|
||||
```
|
||||
|
||||
`TEST_DEPLOY_USER`
|
||||
```text
|
||||
root
|
||||
```
|
||||
|
||||
`TEST_DEPLOY_PORT`
|
||||
```text
|
||||
22
|
||||
```
|
||||
|
||||
`TEST_DEPLOY_PATH`
|
||||
```text
|
||||
/opt/workdock
|
||||
```
|
||||
|
||||
`TEST_DEPLOY_SSH_KEY`
|
||||
```text
|
||||
<paste the full private SSH key that can log in to root@192.168.2.55>
|
||||
```
|
||||
|
||||
The SSH key must include the full multi-line content, for example:
|
||||
```text
|
||||
-----BEGIN OPENSSH PRIVATE KEY-----
|
||||
...
|
||||
-----END OPENSSH PRIVATE KEY-----
|
||||
```
|
||||
|
||||
### How to verify the SSH key before adding it
|
||||
From your local machine:
|
||||
```bash
|
||||
ssh -4 root@192.168.2.55
|
||||
```
|
||||
|
||||
If that works without asking for a password, the matching private key is the correct one to store in `TEST_DEPLOY_SSH_KEY`.
|
||||
|
||||
### Production environment secrets
|
||||
Add:
|
||||
- `PROD_DEPLOY_HOST`
|
||||
@@ -239,6 +301,38 @@ From GitHub Actions:
|
||||
1. open `Deploy Test`
|
||||
2. click `Run workflow`
|
||||
|
||||
### First GitHub Actions validation
|
||||
After you add the `development` environment secrets:
|
||||
1. Open:
|
||||
- `https://github.com/Bostame/workdock-platform/actions`
|
||||
2. Open workflow:
|
||||
- `Deploy Test`
|
||||
3. Click:
|
||||
- `Run workflow`
|
||||
4. Select branch:
|
||||
- `develop`
|
||||
5. Run it
|
||||
6. Wait until both steps complete:
|
||||
- upload bundle
|
||||
- deploy over SSH
|
||||
7. Verify:
|
||||
- `http://192.168.2.55:8088/healthz/`
|
||||
8. Then open the app home page in the browser
|
||||
|
||||
### What success looks like
|
||||
- workflow status is green in GitHub Actions
|
||||
- `Deploy Test` job finishes without SSH or health-check errors
|
||||
- `/healthz/` returns `200 OK`
|
||||
- the containers on the test server remain up
|
||||
|
||||
### If the workflow fails
|
||||
Check in this order:
|
||||
1. wrong or incomplete `TEST_DEPLOY_SSH_KEY`
|
||||
2. wrong `TEST_DEPLOY_USER`
|
||||
3. wrong `TEST_DEPLOY_PATH`
|
||||
4. changed server host key
|
||||
5. server disk-space or Docker runtime issue
|
||||
|
||||
## How to validate a deployment
|
||||
### From your machine
|
||||
```bash
|
||||
|
||||
Reference in New Issue
Block a user