Hosting
GitHub Advanced Features Guide
Explore GitHub's advanced features including Actions, Pages, Projects, Wiki, and repository management beyond basic Git hosting.
- Team leads or developers choosing a Git hosting solution
- Basic Git remote operation knowledge
- Understanding of code hosting requirements
- Comparing only feature lists while ignoring operational costs
- Choosing a self-hosted solution without sufficient maintenance capacity
Overview
GitHub is more than just a Git hosting platform. This guide explores advanced features to help you manage projects and team collaboration more effectively.
Actions Advanced
Custom Action
# .github/actions/my-action/action.yml
name: "My Custom Action"
description: "A reusable custom action"
inputs:
who-to-greet:
description: "Who to greet"
required: true
default: "World"
outputs:
time:
description: "The time we greeted"
runs:
using: "node20"
main: "index.js"
Matrix Builds
jobs:
test:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
node: [18, 20, 22]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- run: npm test
Environments with Approvals
jobs:
deploy:
environment: production
steps:
- run: ./deploy.sh
Production environments can require manual approval before deployment.
GitHub Pages
Deploy Static Sites
# .github/workflows/deploy.yml
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: npm run build
- uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./out
Custom Domain
# Configure in project Pages settings:
# Custom domain: docs.yourdomain.com
# Add CNAME or A record to GitHub Pages
GitHub Projects
Projects provide Jira-like project management:
- Table view: Spreadsheet-like view
- Board view: Kanban board
- Roadmap view: Timeline view
- Automation rules: Auto-move cards by Issue/PR state
Advanced Repository Management
CODEOWNERS
# .github/CODEOWNERS
* @team-core
/src/api/ @team-api
/docs/ @team-docs
*.md @docs-maintainer
Auto-assign reviewers based on file changes.
Rulesets
Rulesets are more flexible than branch protection, applying rules across branches and tags.
- Lock repository configuration
- Require linear history
- Restrict create/delete permissions per user
Security Features
| Feature | Description |
|---|---|
| Dependabot | Auto-detect dependency vulnerabilities and create PRs |
| Secret scanning | Auto-detect secrets in repositories |
| Code scanning | CodeQL-based code analysis |
| Private vulnerability reporting | Secure channel for security researchers |
Continue Learning
hosting/platform-comparison— Platform comparisonhosting/gitea-setup— Gitea self-hosted setupgithub/github-flow-basics— GitHub Flow basics