Using Git Pages for Mobile Apps
Setting up a Github Page to Host Your Mobile App
To host your app for Capstone, you don't need to use a mobile app store. You can simply put up a static HTML page with a link to your APK. This wouldn't be a real word way to handle this, but it will be ok for this class.
Step 1: Create a GitHub Account
- Go to GitHub and sign up for an account.
- Verify your email and log in.
Step 2: Create a New Repository
- Click the "+" icon in the top-right corner and select "New repository".
- Enter a repository name (e.g., my-github-page).
- Set the repository to Public.
- Check "Add a README file".
- "Create repository".
Step 3: Enable GitHub Pages
- Go to your repository.
- Click on "Settings" (found in the top menu).
- Scroll down to "Pages" (under "Code and automation" on the left-hand nav menu).
- Under "Branch", select main (or master) as the source.
- Click "Save".
- GitHub will generate a link (e.g., https://yourusername.github.io/my-github-page/). Give it 2-5 minutes to generate the code and create the link.
Step 4: Add an HTML File
- Go back to your repository.
- Click "Add file" > "Create new file".
- Name it index.html (this will be the homepage).
- Add basic HTML code. Include a description of your app and a link to your APK.
- To clarify, the link to your APK is a literal URL created with an HTML anchor tag that allows someone to access and download a file or visit a website. If you don't know what an anchor tag is, visit this tutorial. When you upload your APK to your github, or with something like OneDrive, it gets its own URL. Use that URL to write your HTML code so users can download the executable APK file of your mobile app. The link to your APK has nothing to do with your Gitlab repo.
- Click "Commit New File".
Step 5: View Your Website
- Wait a few minutes for GitHub to deploy your page.
- Visit your GitHub Pages link (https://yourusername.github.io/my-github-page/).
Step 6: View Your Website
- Go to your repository and click on index.html.
- Click "Edit" (pencil icon).
- Make changes to the file and click "Commit changes".
- Refresh your GitHub Pages link after a few minutes to see the updates.