Steps
You must have an account on Github
You must create a repository where the project will be hosted
Once inside Github, go to the top right where your user image is located and select it, below I show you a detailed list of the steps to follow:
- Settings
- Developer settings
- Personal access tokens
- Tokens (classic)
- Generate new token
- Generate new token (classic)
- To specific the
nameoftokenExample:TOKEN_DEPLOY - Select the expiration
- Select box
workflow - Select box
write:packages - Press button
Generate token - Copy token generated Example:
ghp_ffs61bz87J7mX1uSH3iFAGSNfYq5Z2143hYD - You go to your project repository Example:
https://github.com/username-on-github/name-repository - Settings
- Secrets and variables
- Actions
- New repository secret
- On
Nameyou must put the name of token:TOKEN_DEPLOY - On
Secretthe value of token:ghp_ffs61bz87J7mX1uSH3iFAGSNfYq5Z2143hYD - Also you can add others variables like:
HOST_VPS,PASSWORD_VPS,PORT_VPS,USERNAME_VPS - Now you can make
pushonbranch - Execute command:
git add . - Then the command:
git commit -m "name of commit" - Finally:
git push origin [the branch you specified on deploy.yml file]