Skip to content

Commit e4c4d18

Browse files
authored
[IMPROVEMENT] Add documentation to setup CI/CD for platform (#843)
1 parent 7062892 commit e4c4d18

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

install/installation.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,3 +345,26 @@ Since pure-ftpd server runs over TCP port 21 and we allow passive TCP port range
345345
- Source IPv4 ranges: 0.0.0.0/0
346346
- Protocols and ports -> Specified protocols and ports -> TCP -> Port: 21,30000-50000
347347
- Now click on "Save"
348+
349+
### Setup Automated Deployments for Platform via GitHub
350+
To setup automated deployments via GitHub workflows, follow these steps:
351+
- Ensure GitHub Actions is enabled in the repository (It is disabled for forks by default).
352+
- Create two new GitHub repository variables, from the Settings tab
353+
- Navigate to "Secrets and variables" -> "Actions" -> "Variables".
354+
- Click on "New repository variable" and setup the following variables:
355+
- `PLATFORM_DOMAIN`: The domain your platform is to be deployed, for example: `sampleplatform.ccextractor.org`.
356+
- `SSH_USER`: The user that has root access and would be used to SSH into the server.
357+
358+
(You can see a list of users in your system by running the command ```less /etc/passwd```)
359+
360+
- Now get the SSH private and public(`.pub`) keys by running the following command locally:
361+
```
362+
ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
363+
```
364+
- Now SSH into the VM instance where the platform is to be deployed, open the file `/home/<SSH_USER>/.ssh/authorized_keys` and append the contents of the public key to the end of the file.
365+
- Now the last step is to add the SSH private key to the GitHub secrets
366+
- Navigate to "Secrets and variables" -> "Actions" -> "Secrets".
367+
- Click on "New repository secret" and setup the following variable:
368+
- `SSH_KEY_PRIVATE`: Save the contents of the private SSH key file created in the last step as this secret.
369+
- Also checkout the variables `INSTALL_FOLDER` and `SAMPLE_REPOSITORY` in the [deployment pipeline](/.github/workflows/sp-deployment-pipeline.yml) in case you have configured values other than default.
370+

0 commit comments

Comments
 (0)