Upload from Git
The Upload from Git method allows you to deploy your application directly from a Git repository. This method is useful for teams that manage their code in version control systems and want deployments to be triggered from repository updates.
Steps to Deploy Using Upload from Git
Step 1: Open Deploy App
From the dashboard, navigate to Static Site.
Step 2: Configure Site Details
Provide the required deployment information such as the site name and other configuration details required by the platform.
Step 3: Select Organization
Choose the organization where the site will be deployed.
Step 4: Select Upload from Git
Choose Upload from Git from the deployment methods.
Step 5: Connect Repository
Enter the required repository details such as the repository URL and branch name.
Step 6: Configure Build Settings
Provide the required build configuration fields so the platform can build the project correctly.
1. Git Provider & Repository URL
Provider: You have GitHub selected as your source.
Repository URL: You've entered a specific Git URL. The green checkmark and the message "Repository validated successfully" indicate that Nife can successfully "see" this repository.
Branch: It has been set to the main branch. This means the branch Nife will pull code from whenever a deployment is triggered.
2. Personal Access Token (PAT)
There is an optional field for a Personal Access Token.
When to use it: You only need to fill this out if the repository you are trying to deploy is Private. Since the example in the image is an public repository, the repo was validated without PAT, incase you want to aquire knowledge on how to generate a PAT, you can refer to the How to section available at the top right corner of PAT platform.
3. Source Security Scan (SAST)
This is a sophisticated feature for enterprise-grade deployments:
SAST (Static Application Security Testing): By clicking "Run Security Scan," Nife will analyze your source code for vulnerabilities (like hardcoded passwords, insecure functions, or "secrets" left in the code) before it actually builds the site.
Secrets Detection: This is currently enabled to ensure you aren't accidentally deploying sensitive API keys or credentials.
SCA (Software Composition Analysis): Listed as "Coming Soon," this will eventually check your project's dependencies (the libraries you use) for known security flaws.
Once you have configured the build settings, click Continue.
Step 7: Select Import Type
We are further provided with two options to select from:
- Import Build File
Click on Import Build File to import a build file from a Git repository.
Once you Select this method, the platform will take you to an final page that shows an Summary of all the previosly selected options for confirmation, if that okay click on Deploy Site else we can always click on Back to go back to the previous page and make changes.
- Import Source Code
Click on Import Source Code to import a source code from a Git repository.
Once you Select this method, the platform will take you to an page that gives us the option to choose Framework, which then ask's us for which Install Command to use Like npm install (mainly for react), yarn install, pnpm install etc, which then shows the same steps as Import Build File where Environment Variables and also show the summary of all the previosly selected options for confirmation, if that okay click on Deploy Site else we can always click on Back to go back to the previous page and make changes.
Step 8: Deploy the Site
Click Deploy Site to begin the deployment.
The platform will pull the code from the repository, build the project, and successfully deploy the application.