Build a Blog from Your Android Phone
Deploy a live Hugo blog to GitHub Pages using only your Android phone.
Introduction
30 Second Summary
Your phone is always with you. What if you could build and launch a personal website from it without ever needing a laptop?
In this project, you will set up a complete development environment on your Android phone, create a blog using a static site generator, and deploy it live to the internet using only mobile apps.
What You'll Build
A personal blog site generated with Hugo and deployed to GitHub Pages, built entirely from your Android phone using Termux and Acode.
By the end of this project, you'll have:
- A Hugo site with a theme, homepage, and at least one blog post written in Markdown.
- A GitHub repository with a GitHub Actions workflow that automatically deploys your site whenever you push changes.
- A live public blog URL that anyone on the internet can visit.
- Secret Mission: Add a custom About page and a second blog post with an image.
Are there any prerequisites?
You need an Android phone running Android 7.0 or newer and a GitHub account. No coding experience or laptop required.
Install Termux and Acode
To build a blog from your phone, you need two core tools. A terminal gives you the power to run commands and manage files. A code editor gives you a comfortable way to write and edit your blog content.
In this step, you will install Termux (a terminal emulator for Android) and Acode (a lightweight code editor). You will also configure them to share a folder so that files you create in the terminal are instantly editable in the code editor.
In this step, get ready to:
- Install Termux from F-Droid and update all packages.
- Install Acode and confirm it launches.
- Set up shared storage between Termux and Acode.
Install Termux from F-Droid
Termux is a terminal emulator that runs a full Linux environment on your Android phone. You will download it from F-Droid (an open-source app store) because the Google Play Store version is outdated and missing functionality.
- Open your phone's browser (Chrome or any browser).
- Navigate to https://f-droid.org/en/packages/com.termux/.
- Tap Download APK to download the latest version of Termux.
- When the download finishes, tap the notification or open the file to install it. Your phone may ask you to allow installs from unknown sources. Tap Settings and enable the toggle, then tap Install.
- Once installed, open Termux. You will see a black terminal screen with a blinking cursor.
Why F-Droid instead of the Play Store?
The Termux version on Google Play is deprecated and no longer maintained. The F-Droid version receives regular updates and has full package repository access.
- Update all Termux packages to their latest versions by running this command:
pkg update && pkg upgrade
What does this command do?
`pkg update` downloads the latest package list from the Termux repositories. `pkg upgrade` upgrades all installed packages to their newest versions.
This ensures all your tools are current before you install anything else.
- Termux may ask you to confirm the upgrades. Type y and press Enter when prompted.
- If you see prompts about configuration files, press Enter to accept the defaults each time.
The update may take a minute or two depending on your internet speed. When it finishes, you will see the $ prompt again.
Seeing download errors?
If packages fail to download, your Termux mirror may be unavailable. Run termux-change-repo to switch to a different mirror, then try pkg update && pkg upgrade again.
Make sure your phone is connected to Wi-Fi or mobile data.
Help me fix my Termux package update errors.
Install Acode from the app store
Acode is a lightweight code editor built for Android. It supports syntax highlighting for over 100 languages and can open files directly from your phone's internal storage.
- Open the Google Play Store on your phone.
- Search for Acode by Foxdebug.
- Tap Install.
- Once installed, open Acode to confirm it launches. You should see a welcome screen or an empty editor.
Acode is also on F-Droid
If you prefer not to use the Play Store, you can install Acode from F-Droid as well. Search for "Acode" in the F-Droid app.
Can't find Acode?
Make sure you are searching for "Acode" (one word) by Foxdebug. It has a blue code-bracket icon.
Help me find and install Acode on my Android phone.
Set up shared storage between Termux and Acode
By default, Termux stores files in its own private directory that other apps cannot access. To edit files in Acode that you create in Termux, you need to set up a shared folder on your phone's internal storage.
- Switch back to Termux.
- Grant Termux access to your phone's storage by running this command:
termux-setup-storage
What does this command do?
This command triggers an Android permission popup asking Termux to access your phone's files. Once granted, it creates a ~/storage directory inside Termux that links to your phone's internal storage.
- When the permission popup appears, tap Allow to grant storage access.
- Create a shared projects folder by running this command:
mkdir -p ~/storage/shared/projects
What is this folder for?
The path ~/storage/shared/ maps to your phone's internal storage (the same place your photos and downloads live). By creating a projects folder here, both Termux and Acode can read and write to the same files.
In Acode, this folder appears at Internal Storage > projects. In Termux, it appears at ~/storage/shared/projects.
- Confirm the folder was created by running:
ls ~/storage/shared/projects
You should see no output (an empty directory). If you see an error, the storage permission was not granted correctly.
Seeing a permission denied error?
If the permission popup did not appear, or you accidentally denied it, go to your phone's Settings > Apps > Termux > Permissions and manually grant storage or file access.
On Android 11 and newer, you may need to grant "All files access" under Settings > Apps > Special app access > All files access > Termux.
After granting the permission, run termux-setup-storage again, then retry the mkdir command.
Help me fix Termux storage permission issues on Android.
Your development environment is ready. Next up, you will install Hugo and Git so you can start building your blog.
Install Hugo and Git in Termux
To turn your phone into a blog-building machine, you need two core tools: a static site generator and version control.
Hugo generates your blog's HTML files from simple Markdown. Git tracks every change you make and connects your phone to GitHub for publishing.
In this step, get ready to:
- Install Hugo and Git inside Termux.
- Configure Git with your identity so commits are attributed to you.
- Verify both tools are working correctly.
Install Hugo and Git
Termux has its own package manager called pkg. It works like an app store for command-line tools.
- Install Hugo and Git by running this command:
pkg install hugo git
What does this command do?
pkg install downloads and installs packages from the Termux repository. Here you are installing two packages at once: hugo (the static site generator) and git (version control).
- When prompted to continue, type y and press Enter.
- Wait for the download and installation to finish. You should see a series of download progress lines followed by a return to the $ prompt.
Seeing a network error?
Make sure your phone has an active internet connection (Wi-Fi or mobile data). If you see a "repository not found" error, run pkg update first and try the install command again.
help me fix a pkg install error in Termux
Configure Git with your identity
Git attaches your name and email to every commit you make. This is how GitHub knows who authored a change.
- Set your Git username, email, and safe directory config by running these commands:
git config --global user.name "[[YOURNAME="enter your name"]]"
git config --global user.email "[[YOUREMAIL="your@email.com"]]"
git config --global --add safe.directory '*'
What do these commands do?
The first two commands tell Git who you are. Every commit you make will be tagged with this name and email.
The third command (safe.directory) prevents Git from showing "unsafe repository" warnings. These warnings happen because the shared storage folder is owned by a different system user than Termux. Setting this globally tells Git to trust all directories.
Seeing a config error?
Make sure each command is on its own line. If you copy all three at once, some terminal apps may not paste multi-line commands correctly. Try running each line one at a time.
help me configure Git in Termux
Verify both tools are installed
- Check that Hugo is installed by running:
hugo version
- You should see output starting with hugo followed by a version number and build details.
- Check that Git is installed by running:
git --version
- You should see output like git version followed by a number.
✔️ I see version numbers for both
Both tools are ready to go. You have everything you need to create a Hugo blog and push it to GitHub.
ⓧ One or both commands say 'not found'
The package did not install correctly. Try running the install command again:
pkg install hugo git
If the problem persists, run pkg update first to refresh the package list, then try installing again.
help me get Hugo and Git installed in Termux
Your development tools are locked and loaded. Next up, you will create your actual Hugo blog site and add a theme to it.
Create Your Hugo Blog
A blog needs structure before it needs content. Hugo is a static site generator that takes your content files and transforms them into a fast, ready-to-publish website.
In this step, you will create a new Hugo project, add a visual theme, and scaffold your first blog post.
In this step, get ready to:
- Create a new Hugo site in your shared projects folder.
- Add a theme and configure your site.
- Create your first blog post file.
Create a new Hugo site
Hugo generates an entire project skeleton with a single command. You need to run this inside the shared folder so both Termux and Acode can access the files.
- Navigate to your shared projects folder and create the Hugo site by running these commands:
cd ~/storage/shared/projects
hugo new site my-blog
- Move into your new site directory by running:
cd my-blog
What did Hugo just create?
The hugo new site command created a my-blog folder with a ready-made project structure: folders for content, themes, static files, and a hugo.toml configuration file.
This structure tells Hugo where to find your blog posts, which theme to use, and how to build the final site.
- Confirm you are inside the my-blog folder by running:
ls
You should see folders like archetypes, content, themes, and the hugo.toml file listed in the output.
Don't see these folders?
Make sure you ran cd my-blog after creating the site. If you see a "No such file or directory" error, double-check that you were inside ~/storage/shared/projects before running hugo new site my-blog.
Still stuck? Help me troubleshoot my Hugo site creation in Termux
Initialize Git and add a theme
Hugo sites are unstyled by default. A theme gives your blog its visual design. You will use the Ananke theme, which is Hugo's recommended starter theme.
- Initialize a Git repository and add the Ananke theme as a submodule by running these commands:
git init
git submodule add https://github.com/theNewDynamic/gohugo-theme-ananke.git themes/ananke
What is a Git submodule?
A Git submodule links another Git repository (the theme) inside your own project. This keeps the theme code separate from your blog content, so you can update the theme independently later.
- You should see output showing the theme being cloned into themes/ananke.
Now you need to tell Hugo to use this theme and set your site details. The default hugo.toml file needs updating with your blog title and the theme name.
- Overwrite the hugo.toml file with your site configuration by running this command:
cat > hugo.toml << EOF
baseURL = 'https://[[GITHUB_USERNAME="your GitHub username"]].github.io/'
languageCode = 'en-us'
title = 'My Blog'
theme = 'ananke'
EOF
What does this configuration do?
- baseURL tells Hugo the public address where your blog will live.
- languageCode sets the site language to English.
- title is the name displayed in your blog header.
- theme points Hugo to the Ananke theme you just downloaded.
- Verify the file was written correctly by running:
cat hugo.toml
You should see four lines of configuration with your GitHub username in the baseURL value.
Seeing an empty file or errors?
If cat hugo.toml shows nothing, make sure you typed the cat > hugo.toml << EOF command correctly with the exact spacing. The EOF on the last line must be on its own line with no spaces before it.
Help me fix my hugo.toml file in Termux
Create your first blog post
Hugo has a built-in command to scaffold new content files with pre-filled metadata called front matter. Front matter stores information like the post title, date, and draft status.
- Create your first blog post by running:
hugo new content/posts/my-first-post.md --noBuildLock
What does --noBuildLock do?
The --noBuildLock flag prevents Hugo from creating a .hugo_build.lock file. Android's shared storage has file-locking limitations that cause Hugo commands to fail without this flag.
- Confirm the post file was created by running:
cat content/posts/my-first-post.md
You should see Markdown front matter with a title, date, and draft: true between two --- lines.
Getting a permission or lock error?
Make sure you included the --noBuildLock flag at the end of the command. Without it, Hugo tries to create a lock file that Android's shared storage does not support.
Help me fix my hugo new command error on Android
✔️ Awesome, I've got everything!
Great. Make sure you are still in the ~/storage/shared/projects/my-blog directory before moving on.
ⓧ I'd like to double check the full code
Here is what your hugo.toml should look like:
baseURL = 'https://yourusername.github.io/'
languageCode = 'en-us'
title = 'My Blog'
theme = 'ananke'
And here is what content/posts/my-first-post.md should look like (your date will reflect when you ran the command):
---
title: "My First Post"
date: 2026-05-26T12:00:00+00:00
draft: true
---
Your blog has a skeleton, a theme, and a first post ready to go. Next up, you will open Acode to write actual content in your blog post.
Edit Your Blog Post in Acode
Hugo generated your blog post file, but it only contains placeholder front matter and no actual content.
In this step, you will open the post in Acode, switch it from draft to published, and write your first blog post in Markdown.
In this step, get ready to:
- Open your blog post file in Acode.
- Edit the front matter and write blog content in Markdown.
- Save the file.
Open your blog post in Acode
Acode can access the same shared storage folder you created in Termux. This means you can navigate directly to your blog files from within the editor.
- Open the Acode app on your phone.
- Tap the hamburger menu (three horizontal lines) in the top-left corner.
- Navigate to Internal Storage > projects > my-blog > content > posts.
- Tap my-first-post.md to open it in the editor.
You should see the file open with a few lines of text between two sets of --- dashes. This section is called front matter.
What is front matter?
Front matter is metadata at the top of a Markdown file, wrapped between two --- lines. Hugo reads this section to determine the post's title, date, and whether it is a draft or ready to publish.
Everything you write below the closing --- becomes the actual blog post content that visitors see.
Don't see your files in Acode?
If Internal Storage shows no files, tap the + icon in the top-right corner, select Add Path, choose Internal Storage, and tap Select This Folder. This grants Acode persistent access to your files.
help me find my blog files in Acode
Edit the front matter and write your content
The post is currently set to draft: true, which means Hugo will hide it from your live site. You need to change this to draft: false so the post gets published.
- In the editor, find this line inside the front matter:
draft: true
- Change true to false, so the line now looks like this:
draft: false
Now you will write the actual blog post content. Everything below the closing --- line is your post body, written in Markdown.
- Place your cursor on the empty line below the second --- and type the following content:
## Hello World
This is my first blog post, written entirely from my Android phone using Termux and Acode. Pretty cool, right?
I am using **Hugo** to generate this static site and **GitHub Pages** to host it for free. Every time I push a change to my repository, the site rebuilds automatically.
### What I learned today
- How to use Termux as a terminal on Android
- How to create a Hugo site
- How to deploy to GitHub Pages with GitHub Actions
What does this Markdown do?
- ## Hello World creates a second-level heading. The number of # symbols sets the heading level.
- **Hugo** wraps text in double asterisks to make it bold.
- Lines starting with - become bullet points in a list.
- Blank lines between paragraphs separate them visually on the rendered page.
Save your changes
- Tap the save icon (floppy disk) in the Acode toolbar to save my-first-post.md.
- If you have an external keyboard connected, you can also press Ctrl+S.
After saving, the file tab in Acode should no longer show an unsaved indicator (a dot or asterisk next to the filename).
Seeing a "no write permission" error?
Make sure you opened the file through the hamburger menu file browser, not from an external file manager app. Files opened through external apps may not have persistent write access.
Try closing the file, then re-opening it through the Acode file browser by navigating to Internal Storage > projects > my-blog > content > posts.
help me fix Acode file permission issues
✔️ Awesome, I've got everything!
Great. Double check you have saved your file before moving on.
ⓧ I'd like to double check the full code
Here is the complete my-first-post.md file. Make sure yours matches exactly:
---
title: "My First Post"
date: 2026-05-26T12:00:00+00:00
draft: false
---
## Hello World
This is my first blog post, written entirely from my Android phone using Termux and Acode. Pretty cool, right?
I am using **Hugo** to generate this static site and **GitHub Pages** to host it for free. Every time I push a change to my repository, the site rebuilds automatically.
### What I learned today
- How to use Termux as a terminal on Android
- How to create a Hugo site
- How to deploy to GitHub Pages with GitHub Actions
Your blog post is written and saved. Next up, you will preview it locally in your phone's browser to see how it looks before publishing it to the world.
Preview Your Blog Locally
Your blog post is written and saved. Now it is time to see what it actually looks like in a browser.
Hugo includes a built-in development server that renders your site locally on your phone. You can view your blog at a local URL without needing to deploy anything to the internet first.
In this step, get ready to:
- Start Hugo's local development server in Termux.
- Preview your blog in your phone's browser.
- Stop the server when you are done previewing.
Start the Hugo local server
Hugo's local server watches your files and renders your site on a local URL. This lets you check your content before publishing it to the world.
- Switch back to Termux. Your working directory should still be ~/storage/shared/projects/my-blog from the previous step.
- Start the local server by running this command:
hugo server --noBuildLock
Why the --noBuildLock flag?
Hugo normally creates a .hugo_build.lock file when it runs. On Android's shared storage, this lock file causes write permission errors.
The --noBuildLock flag tells Hugo not to create the lock file, which avoids those errors entirely.
You should see output that includes Web Server is available at http://localhost:1313/ in Termux. This means the server is running.
Don't see the server start?
If you see an error about the directory, confirm you are in the right folder by running pwd. The output should show ~/storage/shared/projects/my-blog. If not, run cd ~/storage/shared/projects/my-blog and try again.
If you see a theme error, make sure your hugo.toml file contains theme = 'ananke' and that the themes/ananke folder exists.
Help me troubleshoot why my Hugo server won't start in Termux
Preview your blog in the browser
With the server running, you can view your blog just like any website visitor would see it.
- Open your phone's browser (Chrome or any browser you have installed).
- Type http://localhost:1313 into the address bar and press Enter.
You should see your Hugo blog with the Ananke theme applied. Your post titled "My First Post" appears on the homepage.
What is localhost?
When you type localhost:1313 in your browser, you are telling the browser to connect to a server running on your own device. Port 1313 is Hugo's default port.
Nobody else on the internet can see this. It is only visible on your phone until you deploy it later.
Seeing a blank page or connection error?
Make sure the Hugo server is still running in Termux. If you accidentally closed Termux or pressed Ctrl+C, run hugo server --noBuildLock again.
If the page loads but has no posts, confirm that draft: false is set in your my-first-post.md file. Hugo hides draft posts from the local server by default.
Help me figure out why my Hugo blog isn't loading in the browser
Stop the local server
Once you have confirmed your blog looks good, you can stop the server. You will not need it running for the next step.
- Switch back to Termux.
- Press Ctrl+C to stop the Hugo server.
You should see the terminal return to a normal command prompt, ready for new commands.
Keyboard shortcuts in Termux
If your on-screen keyboard does not show a Ctrl key, tap the extra keys row at the bottom of the Termux screen. Termux provides a row of special keys including Ctrl, Alt, and Tab.
Your blog is working locally. Next up, you will deploy it to GitHub Pages so the whole world can see it.
Deploy to GitHub Pages
Your blog is working locally on your phone. Now it is time to put it on the internet so anyone can see it.
GitHub Pages is a free hosting service that serves static websites directly from a GitHub repository. You will create a repository, add an automated deployment workflow, and push your code to make your blog live at a public URL.
In this step, get ready to:
- Create a public GitHub repository for your blog.
- Add a GitHub Actions workflow for automated deployment.
- Push your code and enable GitHub Pages.
Create a new GitHub repository
You need a GitHub repository with a specific naming pattern to host your blog. The repository name must match your GitHub username followed by .github.io.
- Switch to your phone's browser where you are signed into GitHub.
- Navigate to https://github.com/new to create a new repository.
- In the Repository name field, type your GitHub username followed by .github.io (for example, janedoe.github.io).
- Make sure Public is selected (not Private).
- Leave all checkboxes unchecked. Do not add a README, .gitignore, or license.
- Tap Create repository.
Why this specific repository name?
GitHub Pages serves your site at https://yourusername.github.io automatically when the repository name matches that pattern. Any other name would require extra configuration.
Create the GitHub Actions workflow file
GitHub Actions automates your deployment. Every time you push code to your repository, a workflow file tells GitHub to rebuild your Hugo site and publish it.
- Switch back to Termux.
- Create the workflow directory by running this command:
mkdir -p .github/workflows
- Create the workflow file by running this command:
cat > .github/workflows/hugo.yaml << 'EOF'
name: Deploy Hugo site to Pages
on:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
defaults:
run:
shell: bash
jobs:
build:
runs-on: ubuntu-latest
env:
HUGO_VERSION: 0.147.3
steps:
- name: Checkout
uses: actions/checkout@v6
with:
submodules: recursive
fetch-depth: 0
- name: Setup Pages
id: pages
uses: actions/configure-pages@v6
- name: Install Hugo
run: |
curl -sLJO "https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.tar.gz"
mkdir "${HOME}/.local"
mkdir "${HOME}/.local/hugo"
tar -C "${HOME}/.local/hugo" -xf "hugo_extended_${HUGO_VERSION}_linux-amd64.tar.gz"
rm "hugo_extended_${HUGO_VERSION}_linux-amd64.tar.gz"
echo "${HOME}/.local/hugo" >> "${GITHUB_PATH}"
- name: Build the site
run: |
hugo build \
--gc \
--minify \
--baseURL "${{ steps.pages.outputs.base_url }}/"
- name: Upload artifact
uses: actions/upload-pages-artifact@v5
with:
path: ./public
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v5
EOF
What does this workflow do?
This YAML file defines a workflow that runs automatically every time you push to the main branch.
- It downloads and installs Hugo version 0.147.3 on a GitHub server.
- It builds your site with hugo build, producing optimized HTML files.
- It uploads the built files and deploys them to GitHub Pages.
Long paste on your phone
This is a long command. Tap and hold in Termux to paste it after copying from this project. Make sure you include both the opening cat > line and the closing EOF line.
- Confirm the file was created by running:
ls .github/workflows/
You should see hugo.yaml in the output.
- Now create the .gitignore file by running this command:
cat > .gitignore << 'EOF'
public/
.hugo_build.lock
resources/
EOF
What does .gitignore do?
The .gitignore file tells Git to skip certain files when tracking changes. The public/ folder contains generated output that GitHub rebuilds on its own.
The .hugo_build.lock and resources/ entries are local build artifacts that do not belong in your repository.
- Confirm the .gitignore was created by running:
cat .gitignore
You should see the three entries: public/, .hugo_build.lock, and resources/.
File not created?
Make sure you are in the ~/storage/shared/projects/my-blog directory. Run pwd to check your current location. If you are elsewhere, run cd ~/storage/shared/projects/my-blog first.
help me create files in Termux using heredoc commands
✔️ Awesome, I've got everything!
Great. Make sure both files are saved before moving on.
ⓧ I'd like to double check the full code
Here is the complete .github/workflows/hugo.yaml file:
name: Deploy Hugo site to Pages
on:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
defaults:
run:
shell: bash
jobs:
build:
runs-on: ubuntu-latest
env:
HUGO_VERSION: 0.147.3
steps:
- name: Checkout
uses: actions/checkout@v6
with:
submodules: recursive
fetch-depth: 0
- name: Setup Pages
id: pages
uses: actions/configure-pages@v6
- name: Install Hugo
run: |
curl -sLJO "https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.tar.gz"
mkdir "${HOME}/.local"
mkdir "${HOME}/.local/hugo"
tar -C "${HOME}/.local/hugo" -xf "hugo_extended_${HUGO_VERSION}_linux-amd64.tar.gz"
rm "hugo_extended_${HUGO_VERSION}_linux-amd64.tar.gz"
echo "${HOME}/.local/hugo" >> "${GITHUB_PATH}"
- name: Build the site
run: |
hugo build \
--gc \
--minify \
--baseURL "${{ steps.pages.outputs.base_url }}/"
- name: Upload artifact
uses: actions/upload-pages-artifact@v5
with:
path: ./public
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v5
And the complete .gitignore file:
public/
.hugo_build.lock
resources/
Push your code to GitHub
With all your files ready, you will connect your local repository to GitHub and push everything up. This triggers the automated workflow you just created.
GitHub no longer accepts passwords for Git operations over HTTPS. You need a Personal Access Token (PAT) to authenticate when pushing code.
- In your phone's browser, tap your profile picture on GitHub, then tap Settings.
- In the left sidebar, tap Developer settings.
- Under Personal access tokens, tap Tokens (classic).
- Tap Generate new token, then tap Generate new token (classic).
- In the Note field, enter a name like termux-blog.
- Check the repo scope checkbox.
- Tap Generate token.
- Copy the token immediately. You will not see it again after leaving this page.
What is a Personal Access Token?
A Personal Access Token is a special password that GitHub generates for you. It replaces your regular password when pushing code over HTTPS from tools like Termux.
The repo scope gives the token permission to read and write to your repositories. Keep this token secret and do not share it.
- Switch back to Termux and connect your local repo to GitHub by running this command:
git remote add origin https://github.com/[[GITHUB_USERNAME="your GitHub username"]]/[[GITHUB_USERNAME="your GitHub username"]].github.io.git
- Stage all your files, commit them, and push to GitHub by running these commands:
git add -A
git commit -m "Initial blog"
git push -u origin main
What will Termux ask me?
When you run git push, Termux will prompt you for credentials.
- Username: enter your GitHub username.
- Password: paste your Personal Access Token (not your GitHub password).
After the push completes, you should see output showing your files uploaded to the main branch.
- Now enable GitHub Pages. In your phone's browser, go to your new repository on GitHub.
- Tap Settings (the repository settings tab, not your account settings).
- Tap Pages in the left sidebar.
- Under Source, select GitHub Actions.
Push rejected or authentication failed?
If you see an authentication error, double-check that you pasted your Personal Access Token (not your GitHub password) when prompted for the password. Make sure the token has the repo scope selected.
If the push is rejected because the remote has content, you may have accidentally initialized the repo with a README. Delete the repository on GitHub, recreate it without a README, and try the push again.
help me push my code to GitHub from Termux
Your code is on GitHub and the deployment workflow is configured. Next, you will verify that the automated build completes and your blog goes live on the internet.
Verify Your Live Blog
In the previous step, you pushed your entire Hugo blog to GitHub and configured GitHub Pages. Now GitHub Actions is building your site in the cloud.
The GitHub Actions workflow you created automatically installs Hugo, builds your site, and deploys it to GitHub Pages every time you push to main. In this step, you will confirm the build succeeded and see your blog live on the internet.
In this step, get ready to:
- Confirm the GitHub Actions workflow completes successfully.
- Visit your live blog URL and see it running on the internet.
Check the GitHub Actions workflow status
When you pushed your code in the previous step, GitHub automatically detected the workflow file and started running it. The workflow installs Hugo, builds your site, and uploads it to GitHub Pages.
- Return to your GitHub repository in your phone's browser.
- Tap the Actions tab near the top of the repository page.
- You should see a workflow run listed called Initial blog (matching your commit message).
- Wait for the status indicator to turn green (a green checkmark). This usually takes 1-2 minutes.
What do the status indicators mean?
A yellow circle means the workflow is still running. A green checkmark means it completed successfully. A red X means something went wrong during the build or deploy.
Seeing a red X on the workflow?
Tap the failed workflow run to see the error details. Common causes:
- The theme submodule did not clone properly. Make sure you ran git submodule add (not just git clone) for the Ananke theme in Step 3.
- GitHub Pages is not enabled. Go to Settings > Pages and confirm the source is set to GitHub Actions.
- A typo in .github/workflows/hugo.yaml. YAML is sensitive to indentation. Double check your file in Acode matches the workflow from Step 6.
Help me debug my failed GitHub Actions workflow for Hugo deployment.
Visit your live blog
Once the workflow shows a green checkmark, your blog is live on the internet. Time to see it in action.
- Open a new tab in your phone's browser.
- Navigate to https://yourusername.github.io (replace with your actual GitHub username).
- You should see your Hugo blog with the Ananke theme. Your first post ("My First Post") appears on the homepage.
Your blog is now publicly accessible to anyone on the internet. You built and deployed it entirely from your Android phone.
What if the page shows a 404?
GitHub Pages can take a few minutes to go live after the first deployment. Wait 2-3 minutes and refresh the page. If it still shows a 404, confirm the repository name matches your username exactly (it must be yourusername.github.io).
Blog loads but looks unstyled?
This usually means the baseURL in hugo.toml does not match your actual GitHub Pages URL. Open hugo.toml in Acode and make sure the baseURL starts with https:// and ends with a trailing slash.
Help me fix my Hugo blog that loads without CSS on GitHub Pages.
Secret mission
Add an About Page and a Second Post with an Image
Your blog has one post and no navigation. Can you add an About page that appears in your site's menu, and write a second post that includes an image? Everything stays on your phone.
Clean Up Your Resources
Clean Up Your Resources
Decide whether to keep your resources running, pause them to come back later, or delete them entirely. This project runs entirely locally on your phone and deploys to GitHub Pages for free, so there are no ongoing costs.
Resources you used:
- Local project files at ~/storage/shared/projects/my-blog.
- GitHub repository yourusername.github.io with GitHub Pages enabled.
- Hugo and Git packages installed in Termux.
- Termux and Acode apps installed on your phone.
Keep everything running
No action needed. Choose this if you plan to keep writing blog posts from your phone.
- Your blog stays live at your GitHub Pages URL.
- Your local project files remain on your phone for editing.
- Termux and Acode stay installed, ready for your next post.
- Hugo and Git remain available in Termux.
Pause - I'll come back to this later
Free up some phone storage while keeping your blog live online. Your GitHub repository preserves everything you need to resume later.
- Your blog stays live at your GitHub Pages URL with no action needed.
- You can optionally delete the local project files to free phone storage. When you want to resume, clone the repository again from GitHub.
Delete - I don't want to use this again
Remove all project resources from your phone and take your blog offline.
- Delete the local project files. Open Termux and run:
rm -rf ~/storage/shared/projects/my-blog
- Delete your GitHub repository. Go to your repository on GitHub, tap Settings, scroll to the bottom to the Danger Zone section, and tap Delete this repository. This takes your blog offline and removes all code from GitHub.
- Uninstall Hugo and Git from Termux. Open Termux and run:
pkg uninstall hugo git
- Uninstall the Termux and Acode apps. Long-press each app icon on your home screen, tap App info, then tap Uninstall.
That's a Wrap!
That's a Wrap!
Nice work! You just built and deployed a personal blog to the internet using nothing but your Android phone.
You've learned how to:
- Installed and configured a full development environment (Termux + Acode) on Android, turning your phone into a real development machine.
- Created a Hugo static site with the Ananke theme, wrote blog posts in Markdown, and previewed them locally on your phone's browser.
- Set up automated deployment with GitHub Actions and published a live blog at yourusername.github.io with a single git push.
- Secret Mission: Added a custom About page to your site navigation and a second blog post featuring an image.
Ready to quiz yourself?