Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Checks your GitHub Pages site for common DNS configuration issues

License

NotificationsYou must be signed in to change notification settings

github/pages-health-check

Checks your GitHub Pages site for common DNS configuration issues

Build StatusGem Version

Installation

gem install github-pages-health-check

Usage

Basic Usage

>check=GitHubPages::HealthCheck::Site.new("choosealicense.com")=>#<GitHubPages::HealthCheck::Site @domain="choosealicense.com" valid?=true>>check.valid?=>true

An invalid domain

>check=GitHubPages::HealthCheck::Site.new("foo.github.com")>check.valid?=>false>check.valid!raisesGitHubPages::HealthCheck::Errors::InvalidCNAMEError

Retrieving specific checks

>check.domain.should_be_a_record?=>true>check.domain.a_record?=>true

Getting checks in bulk

>check.to_hash=>{:cloudflare_ip?=>false,:old_ip_address?=>false,:a_record?=>true,:cname_record?=>false,:valid_domain?=>true,:apex_domain?=>true,:should_be_a_record?=>true,:pointed_to_github_user_domain?=>false,:pointed_to_github_pages_ip?=>false,:pages_domain?=>false,:valid?=>true}>check.to_json=>"{\"cloudflare_ip?\":false,\"old_ip_address?\":false,\"a_record?\":true,\"cname_record?\":false,\"valid_domain?\":true,\"apex_domain?\":true,\"should_be_a_record?\":true,\"pointed_to_github_user_domain?\":false,\"pointed_to_github_pages_ip?\":false,\"pages_domain?\":false,\"valid?\":true}"

Getting the reason a domain is invalid

>check=GitHubPages::HealthCheck::Site.new"developer.facebook.com">check.valid?=>false>check.reason=>#<GitHubPages::HealthCheck::InvalidCNAME>>check.reason.message=>"CNAME does not point to GitHub Pages"

Repository checks

Repository checks require a personal access or OAuth token withrepo or scope. This can be passed as the second argument to the Site or Repository constructors like so:

check=GitHubPages::HealthCheck::Site.new"github/pages-health-check",access_token: "1234

You can also setOCTOKIT_ACCESS_TOKEN as an environmental variable, or via a.env file in your working directory.

Command Line

./script/check pages.github.comhost: pages.github.comuri: https://pages.github.com/nameservers: :defaultdns_resolves?: trueproxied?: falsecloudflare_ip?: falsefastly_ip?: falseold_ip_address?: falsea_record?: falsecname_record?: truemx_records_present?: falsevalid_domain?: trueapex_domain?: falseshould_be_a_record?: falsecname_to_github_user_domain?: truecname_to_pages_dot_github_dot_com?: falsecname_to_fastly?: falsepointed_to_github_pages_ip?: falsenon_github_pages_ip_present?: falsepages_domain?: trueserved_by_pages?: truevalid?: truereason:https?: trueenforces_https?: truehttps_error:https_eligible?: truecaa_error:dns_zone_soa?: falsedns_zone_ns?: false

About

Checks your GitHub Pages site for common DNS configuration issues

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors27


[8]ページ先頭

©2009-2025 Movatter.jp