{"id":20676539,"url":"https://github.com/ryosukedtomita/github-pages-test-docker","last_synced_at":"2026-04-13T04:02:30.168Z","repository":{"id":220329540,"uuid":"750449809","full_name":"RyosukeDTomita/github-pages-test-docker","owner":"RyosukeDTomita","description":"sample react application to use github pages build by docker container.","archived":false,"fork":false,"pushed_at":"2024-03-14T13:13:36.000Z","size":591,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-17T14:55:59.387Z","etag":null,"topics":["docker-compose","github-actions","github-pages","react"],"latest_commit_sha":null,"homepage":"https://ryosukedtomita.github.io/github-pages-test","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RyosukeDTomita.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-30T17:05:52.000Z","updated_at":"2024-02-21T06:00:21.000Z","dependencies_parsed_at":"2024-03-14T14:33:19.368Z","dependency_job_id":"d1e5526a-fc30-4530-862b-634bc7d86778","html_url":"https://github.com/RyosukeDTomita/github-pages-test-docker","commit_stats":null,"previous_names":["ryosukedtomita/github-pages-test-docker"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RyosukeDTomita%2Fgithub-pages-test-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RyosukeDTomita%2Fgithub-pages-test-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RyosukeDTomita%2Fgithub-pages-test-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RyosukeDTomita%2Fgithub-pages-test-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RyosukeDTomita","download_url":"https://codeload.github.com/RyosukeDTomita/github-pages-test-docker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242906402,"owners_count":20204833,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker-compose","github-actions","github-pages","react"],"created_at":"2024-11-16T21:12:57.869Z","updated_at":"2025-12-25T04:02:12.588Z","avatar_url":"https://github.com/RyosukeDTomita.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GitHub Pages を使ってみる\n\n![un license](https://img.shields.io/github/license/RyosukeDTomita/github-pages-test-docker)\n[![.github/workflows/gh-pages.yml](https://github.com/RyosukeDTomita/github-pages-test-docker/actions/workflows/gh-pages.yml/badge.svg)](https://github.com/RyosukeDTomita/github-pages-test-docker/actions/workflows/gh-pages.yml)\n\n## INDEX\n\n- [ABOUT](#about)\n- [LICENSE](#license)\n- [ENVIRONMENT](#environment)\n- [PREPARING](#preparing)\n- [HOW TO USE](#how-to-use)\n- [ABOUT](#about)\n\n---\n\n## ABOUT\n\nUsing github pages with docker container.\n\n---\n\n## LICENSE\n\n---\n\n[UN LICENSE](./LICENSE)\n\n---\n\n## ENVIRONMENT\n\n- react\n- docker\n- github pages\n- github actions\n\n---\n\n## PREPARING\n\n### package.json の設定\n\nFIXME!\n\n```json\n\"homepage\": \"https://ryosukedtomita.github.io/github-pages-test\"\n```\n\n### GitHub 側の設定\n\n- リポジトリの設定から Pages --\u003e Build and deployment を GitHub Actions を選択する。\n\n### github actions の設定\n\ndocker でコンテナを作成し，その中で build したものを github-pages に渡している。\n\n#### GitHub Container Registry にイメージを push する\n\n- Personal Access Token の作成が必用。アカウントの設定ページから，**Developer settings** --\u003e Personal access tokens --\u003e Tokens(classic) --\u003e Generate new token (classic)から作成する。\n- この際に write:packages 等の必用な権限をオンにする。自分は一旦以下のように設定。\n  ![patの設定](./doc/fig/pat.png)\n- 表示されたトークンを保存する。自分は環境変数`GITHUBPAT`に保存した。\n- 試しに push してみる。\n\n```shell\necho $GITHUBPAT | docker login ghcr.io -u RyosukeDTomita --password-stdin\ndocker push ghcr.io/ryosukedtomita/github-pages-test-docker:latest\n```\n\n- うまくいけば Packages に保存されているはず。\n  ![Alt text](doc/fig/packages.png)\n\n#### GitHub Actions Secrets に PAT を保存\n\n- settings --\u003e Secrets and variables --\u003e から変数名`PAT`で Repository secrets を登録する。\n  ![Alt text](doc/fig/secrets.png)\n\n## HOW TO USE\n\njust `git push origin master` and go to your own url set by [package.json](./package.json)\n\n---\n\n## MEMO\n\n### Branch \"master\" is not allowed to deploy to github-pages due to environment protection rules.\n\n- github actions の deploy 時に何故が deploy が失敗する。\n- おそらくバグだとおもわれ(2024/02/02)，Pages の設定ページの Source を一度 Deploy from a branch に変更して Branch を main から master に変更した後，再度 Source を GitHub Actions に変更したら直った。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryosukedtomita%2Fgithub-pages-test-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fryosukedtomita%2Fgithub-pages-test-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryosukedtomita%2Fgithub-pages-test-docker/lists"}