Hosting

GitHub Advanced Features Guide

Explore GitHub's advanced features including Actions, Pages, Projects, Wiki, and repository management beyond basic Git hosting.

Who This Is For
  • Team leads or developers choosing a Git hosting solution
Prerequisites
  • Basic Git remote operation knowledge
  • Understanding of code hosting requirements
Common Risks
  • 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:

  1. Table view: Spreadsheet-like view
  2. Board view: Kanban board
  3. Roadmap view: Timeline view
  4. 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

FeatureDescription
DependabotAuto-detect dependency vulnerabilities and create PRs
Secret scanningAuto-detect secrets in repositories
Code scanningCodeQL-based code analysis
Private vulnerability reportingSecure channel for security researchers

Continue Learning

  1. hosting/platform-comparison — Platform comparison
  2. hosting/gitea-setup — Gitea self-hosted setup
  3. github/github-flow-basics — GitHub Flow basics