Setting up a GitHub Repository and Configuration
To begin, register an account on the official GitHub website at https://github.com/.
After successful registration, proceed with basic configuration by creating a new repository.
Oncee the repository is created, navigate to its main page.
Create a local directory and open it.
Right-click within the directory and select 'Git Bash Here' (ensure Git is installed). This will open a terminla interface.
Execute the following command to initialize the local repository:
git init
Stage all changes using:
git add .
Alternatively, stage specific files with:
git add <filename>
Link the local repository to the remote GitHub repository by running:
git remote add origin https://github.com/username/repository-name.git
Push the local changes to the remote repository with:
git push -u origin main
Build your project using:
npm run build
The build output generates a dist folder. Move this folder into the previously created local directory.
Then execute the following commmands:
git add .
git commit -m "initial commit"
git push -u origin main
Access your repository settings and set GitHub Pages to use the main branch.
Visit your custom domain or GitHub Pages URL to view the deployed project.
For future updates, follow this workflow:
git add .
git commit -m "update description"
git push origin main