How to publish an EVT edition on GitHub - evt-project/evt-viewer-angular GitHub Wiki
Prerequisites
- a GitHub account
- the git command-line program on your computer. See this tutorial about how to install git on your computer: https://github.com/git-guides/install-git.
- a release version of EVT or a custom build of the EVT development app.
Steps
New repository creation
- Once you’ve signed in in GitHub, you’ll create a new repository to get started (Add > New repository).
- On the new repository screen, you need to give this repository a special name which will also be used to generate your website. Your website’s files will live in a repository named
username.github.io
(where “username” is your actual GitHub user name). You can also use a different name; in this case the final link to your GH Page will be slightly different (see below). - Then you need to set up your repository.
Repository and GH Pages Setup
If you already have a local version of your edition with EVT, you can follow the steps below:
- from the terminal navigate to the main folder of your edition (the one containing the
index.html
) - edit the
README.md
so that it describes your edition - then launch the following commands:
git init
git add README.md
git commit -m "first commit"
git branch -M main
git remote add origin https://github.com/evt-project/evt-demo.github.io.git
The reference to the repository will depend on the name you choose
git push -u origin main
-
Now, navigate to repository in GitHub and cli open the "Settings tab". If you scroll down on the settings page, you’ll see the GitHub Pages section near the bottom.
-
Select the branch
main
as the source and save. Once saved you will be prompted with a message showing the link to your site (note that if you choose the same name of your GH account the link will be shorter). -
Now if you navigate to that link you will see the text of the README you saved and pushed before.
-
Go back to the terminal and launch the following commands:
git add .
The "."
is used to add every file that has changed. If you want to add a specific file, just indicate its path; you can also add more than one file by performing multiple git add path/to-file.fileExtension
before the next command.
git commit -m "Add EVT edition"
You can customize the message as you prefer
git push
Wait one minute at least to give GH the time to update its cache, then reload the GH Page of your project, and you will have your edition published on the Web!
Alternative method
This is a simple alternative method, either using the git commands introduced above (git add
for new files, git commit
and git push
) or a git front-end such as SmartGit or GitKraken. Step by step process:
- first create an empty repository on GitHub, but always remember to add a
README
file so that it is not empty; - then pull the repository and create a local copy in a folder on your computer, you can either use git commands or any front-end tool;
- after which you can populate the repository folder (remember, empty except for the
README
file) with a tested and locally working EVT-based edition; - finally
add
commit
andpush
everything using git or the front-end you use normally, then go to the GH Pages menu area to create the github.io edition as explained above.
Update your EVT edition
To update the remote version, every time you perform a change to a file, just launch the three steps above (git add
, git commit
and git push
) and the online version will be automatically updated.
References
- GitHub Pages - https://pages.github.com/
- Getting Started with GitHub Pages - https://guides.github.com/features/pages/