{"id":43719606,"url":"https://github.com/step-security/actions-gh-pages","last_synced_at":"2026-02-05T08:01:17.154Z","repository":{"id":336383021,"uuid":"1147750577","full_name":"step-security/actions-gh-pages","owner":"step-security","description":"GitHub Actions for GitHub Pages 🚀 Deploy static files and publish your site easily. Static-Site-Generators-friendly. Secure drop-in replacement for peaceiris/actions-gh-pages.","archived":false,"fork":false,"pushed_at":"2026-02-04T10:20:19.000Z","size":2083,"stargazers_count":0,"open_issues_count":11,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-04T16:36:12.826Z","etag":null,"topics":["step-security-maintained-actions"],"latest_commit_sha":null,"homepage":"https://docs.stepsecurity.io/actions/stepsecurity-maintained-actions","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/step-security.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":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-02T06:51:10.000Z","updated_at":"2026-02-04T08:41:27.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/step-security/actions-gh-pages","commit_stats":null,"previous_names":["step-security/actions-gh-pages"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/step-security/actions-gh-pages","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/step-security%2Factions-gh-pages","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/step-security%2Factions-gh-pages/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/step-security%2Factions-gh-pages/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/step-security%2Factions-gh-pages/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/step-security","download_url":"https://codeload.github.com/step-security/actions-gh-pages/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/step-security%2Factions-gh-pages/sbom","scorecard":{"id":1242942,"data":{"date":"2026-02-04T17:09:33Z","repo":{"name":"github.com/step-security/actions-gh-pages","commit":"f1adcc7c2e71307ecb16f9be7b65a4246fc05119"},"scorecard":{"version":"v5.0.0","commit":"ea7e27ed41b76ab879c862fa0ca4cc9c61764ee4"},"score":6.9,"checks":[{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/ea7e27ed41b76ab879c862fa0ca4cc9c61764ee4/docs/checks.md#binary-artifacts"}},{"name":"Branch-Protection","score":8,"reason":"branch protection is not maximal on development and all release branches","details":["Info: 'allow deletion' disabled on branch 'main'","Info: 'force pushes' disabled on branch 'main'","Warn: required approving review count is 1 on branch 'main'","Info: codeowner review is required on branch 'main'","Info: status check found to merge onto on branch 'main'","Info: PRs are required in order to make changes on branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/ea7e27ed41b76ab879c862fa0ca4cc9c61764ee4/docs/checks.md#branch-protection"}},{"name":"CI-Tests","score":10,"reason":"4 out of 4 merged PRs checked by a CI test -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project runs tests before pull requests are merged.","url":"https://github.com/ossf/scorecard/blob/ea7e27ed41b76ab879c862fa0ca4cc9c61764ee4/docs/checks.md#ci-tests"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/ea7e27ed41b76ab879c862fa0ca4cc9c61764ee4/docs/checks.md#cii-best-practices"}},{"name":"Code-Review","score":8,"reason":"Found 4/5 approved changesets -- score normalized to 8","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/ea7e27ed41b76ab879c862fa0ca4cc9c61764ee4/docs/checks.md#code-review"}},{"name":"Contributors","score":3,"reason":"project has 1 contributing companies or organizations -- score normalized to 3","details":["Info: stepsecurity contributor org/company found, "],"documentation":{"short":"Determines if the project has a set of contributors from multiple organizations (e.g., companies).","url":"https://github.com/ossf/scorecard/blob/ea7e27ed41b76ab879c862fa0ca4cc9c61764ee4/docs/checks.md#contributors"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/ea7e27ed41b76ab879c862fa0ca4cc9c61764ee4/docs/checks.md#dangerous-workflow"}},{"name":"Dependency-Update-Tool","score":10,"reason":"update tool detected","details":["Info: detected update tool: Dependabot: .github/dependabot.yml:1"],"documentation":{"short":"Determines if the project uses a dependency update tool.","url":"https://github.com/ossf/scorecard/blob/ea7e27ed41b76ab879c862fa0ca4cc9c61764ee4/docs/checks.md#dependency-update-tool"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/ea7e27ed41b76ab879c862fa0ca4cc9c61764ee4/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/ea7e27ed41b76ab879c862fa0ca4cc9c61764ee4/docs/checks.md#license"}},{"name":"Maintained","score":0,"reason":"project was created in last 90 days. please review its contents carefully","details":["Warn: Repository was created in last 90 days."],"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/ea7e27ed41b76ab879c862fa0ca4cc9c61764ee4/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/ea7e27ed41b76ab879c862fa0ca4cc9c61764ee4/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":10,"reason":"all dependencies are pinned","details":["Info:  11 out of  11 GitHub-owned GitHubAction dependencies pinned","Info:   5 out of   5 third-party GitHubAction dependencies pinned","Info:   1 out of   1 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/ea7e27ed41b76ab879c862fa0ca4cc9c61764ee4/docs/checks.md#pinned-dependencies"}},{"name":"SAST","score":8,"reason":"SAST tool detected but not run on all commits","details":["Info: SAST configuration detected: CodeQL","Warn: 5 commits out of 11 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/ea7e27ed41b76ab879c862fa0ca4cc9c61764ee4/docs/checks.md#sast"}},{"name":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: SECURITY.md:1","Info: Found linked content: SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: SECURITY.md:1","Info: Found text in security policy: SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/ea7e27ed41b76ab879c862fa0ca4cc9c61764ee4/docs/checks.md#security-policy"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/ea7e27ed41b76ab879c862fa0ca4cc9c61764ee4/docs/checks.md#signed-releases"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Info: jobLevel 'actions' permission set to 'read': .github/workflows/actions_release.yml:21","Warn: jobLevel 'contents' permission set to 'write': .github/workflows/actions_release.yml:23","Info: jobLevel 'actions' permission set to 'read': .github/workflows/codeql.yml:31","Info: jobLevel 'contents' permission set to 'read': .github/workflows/codeql.yml:32","Info: jobLevel 'issues' permission set to 'read': .github/workflows/scorecards.yml:32","Info: jobLevel 'pull-requests' permission set to 'read': .github/workflows/scorecards.yml:33","Info: jobLevel 'checks' permission set to 'read': .github/workflows/scorecards.yml:35","Info: jobLevel 'contents' permission set to 'read': .github/workflows/scorecards.yml:29","Info: jobLevel 'actions' permission set to 'read': .github/workflows/scorecards.yml:30","Warn: jobLevel 'contents' permission set to 'write': .github/workflows/test.yml:22","Info: topLevel 'contents' permission set to 'read': .github/workflows/actions_release.yml:16","Warn: topLevel 'contents' permission set to 'write': .github/workflows/audit_package.yml:31","Info: topLevel 'packages' permission set to 'read': .github/workflows/audit_package.yml:33","Warn: topLevel 'contents' permission set to 'write': .github/workflows/auto_cherry_pick.yml:24","Info: topLevel 'packages' permission set to 'read': .github/workflows/auto_cherry_pick.yml:26","Info: topLevel 'contents' permission set to 'read': .github/workflows/claude_review.yml:14","Info: topLevel 'packages' permission set to 'read': .github/workflows/claude_review.yml:16","Info: topLevel 'contents' permission set to 'read': .github/workflows/codeql.yml:24","Info: topLevel 'contents' permission set to 'read': .github/workflows/dependency-review.yml:13","Info: topLevel 'contents' permission set to 'read': .github/workflows/guarddog.yml:10","Info: topLevel permissions set to 'read-all': .github/workflows/scorecards.yml:18","Info: found token with 'none' permissions: .github/workflows/test.yml:1"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/ea7e27ed41b76ab879c862fa0ca4cc9c61764ee4/docs/checks.md#token-permissions"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/ea7e27ed41b76ab879c862fa0ca4cc9c61764ee4/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2026-02-05T01:57:00.987Z","repository_id":336383021,"created_at":"2026-02-05T01:57:00.987Z","updated_at":"2026-02-05T01:57:00.987Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29116450,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-05T05:31:32.482Z","status":"ssl_error","status_checked_at":"2026-02-05T05:31:29.075Z","response_time":65,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["step-security-maintained-actions"],"created_at":"2026-02-05T08:00:50.559Z","updated_at":"2026-02-05T08:01:17.094Z","avatar_url":"https://github.com/step-security.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch2 align=\"center\"\u003e\nGitHub Pages Action\n\u003c/h2\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg width=\"400\" alt=\"GitHub Actions for deploying to GitHub Pages with Static Site Generators\" src=\"./images/ogp.svg\"\u003e\n\n[![license](https://img.shields.io/github/license/step-security/actions-gh-pages.svg)](https://github.com/step-security/actions-gh-pages/blob/main/LICENSE)\n[![release](https://img.shields.io/github/release/step-security/actions-gh-pages.svg)](https://github.com/step-security/actions-gh-pages/releases/latest)\n[![GitHub release date](https://img.shields.io/github/release-date/step-security/actions-gh-pages.svg)](https://github.com/step-security/actions-gh-pages/releases)\n![Test](https://github.com/step-security/actions-gh-pages/workflows/Test/badge.svg?branch=main\u0026event=push)\n\n\u003c/div\u003e\n\n\u003e [!NOTE]\n\u003e\n\u003e See also the GitHub official GitHub Pages Action first.\n\u003e\n\u003e - [GitHub Pages now uses Actions by default | The GitHub Blog](https://github.blog/2022-08-10-github-pages-now-uses-actions-by-default/)\n\u003e - [GitHub Pages: Custom GitHub Actions Workflows (beta) | GitHub Changelog](https://github.blog/changelog/2022-07-27-github-pages-custom-github-actions-workflows-beta/)\n\nThis is a **GitHub Action** to deploy your static files to **GitHub Pages**.\nThis deploy action can be combined simply and freely with [Static Site Generators]. (Hugo, MkDocs, Gatsby, mdBook, Next, Nuxt, and so on.)\n\n[Static Site Generators]: https://jamstack.org/generators/\n\nThe next example step will deploy `./public` directory to the remote `gh-pages` branch.\n\n```yaml\n- name: Deploy\n  uses: step-security/actions-gh-pages@v4\n  with:\n    github_token: ${{ secrets.GITHUB_TOKEN }}\n    publish_dir: ./public\n```\n\nFor newbies of GitHub Actions:\nNote that the `GITHUB_TOKEN` is **NOT** a personal access token.\nA GitHub Actions runner automatically creates a `GITHUB_TOKEN` secret to authenticate in your workflow.\nSo, you can start to deploy immediately without any configuration.\n\n\n\n## Supported Tokens\n\nThree tokens are supported.\n\n| Token | Private repo | Public repo | Protocol | Setup |\n|---|:---:|:---:|---|---|\n| `github_token` | ✅️ | ✅️ | HTTPS | Unnecessary |\n| `deploy_key` | ✅️ | ✅️ | SSH | Necessary |\n| `personal_token` | ✅️ | ✅️ | HTTPS | Necessary |\n\nNotes: Actually, the `GITHUB_TOKEN` works for deploying to GitHub Pages but it has still some limitations.\nFor the first deployment, we need to select the `gh-pages` branch or another branch on the repository settings tab.\nSee [First Deployment with `GITHUB_TOKEN`](#%EF%B8%8F-first-deployment-with-github_token)\n\n\n\n## Supported Platforms\n\nAll Actions runners: Linux (Ubuntu), macOS, and Windows are supported.\n\n| runs-on | `github_token` | `deploy_key` | `personal_token` |\n|---|:---:|:---:|:---:|\n| ubuntu-22.04 | ✅️ | ✅️ | ✅️ |\n| ubuntu-20.04 | ✅️ | ✅️ | ✅️ |\n| ubuntu-latest | ✅️ | ✅️ | ✅️ |\n| macos-latest | ✅️ | ✅️ | ✅️ |\n| windows-latest | ✅️ | ⚠️ (WIP) | ✅️ |\n\n\n\n## GitHub Enterprise Server Support\n\n✅️ GitHub Enterprise Server is supported above `2.22.6`.\n\nNote that the `GITHUB_TOKEN` that is created by the runner might not inherently have push/publish privileges on GHES. You might need to create/request a technical user with write permissions to your target repository.\n\n\n\n## Table of Contents\n\n\u003c!-- START doctoc generated TOC please keep comment here to allow auto update --\u003e\n\u003c!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --\u003e\n\n- [Getting started](#getting-started)\n- [Options](#options)\n  - [⭐️ Set Runner's Access Token `github_token`](#%EF%B8%8F-set-runners-access-token-github_token)\n  - [⭐️ Set SSH Private Key `deploy_key`](#%EF%B8%8F-set-ssh-private-key-deploy_key)\n  - [⭐️ Set Personal Access Token `personal_token`](#%EF%B8%8F-set-personal-access-token-personal_token)\n  - [⭐️ Set Another GitHub Pages Branch `publish_branch`](#%EF%B8%8F-set-another-github-pages-branch-publish_branch)\n  - [⭐️ Source Directory `publish_dir`](#%EF%B8%8F-source-directory-publish_dir)\n  - [⭐️ Deploy to Subdirectory `destination_dir`](#%EF%B8%8F-deploy-to-subdirectory-destination_dir)\n  - [⭐️ Filter publishing assets `exclude_assets`](#%EF%B8%8F-filter-publishing-assets-exclude_assets)\n  - [⭐️ Add CNAME file `cname`](#%EF%B8%8F-add-cname-file-cname)\n  - [⭐️ Enable Built-in Jekyll `enable_jekyll`](#%EF%B8%8F-enable-built-in-jekyll-enable_jekyll)\n  - [⭐️ Allow empty commits `allow_empty_commit`](#%EF%B8%8F-allow-empty-commits-allow_empty_commit)\n  - [⭐️ Keeping existing files `keep_files`](#%EF%B8%8F-keeping-existing-files-keep_files)\n  - [⭐️ Deploy to external repository `external_repository`](#%EF%B8%8F-deploy-to-external-repository-external_repository)\n  - [⭐️ Force orphan `force_orphan`](#%EF%B8%8F-force-orphan-force_orphan)\n  - [⭐️ Set Git username and email](#%EF%B8%8F-set-git-username-and-email)\n  - [⭐️ Set custom commit message](#%EF%B8%8F-set-custom-commit-message)\n  - [⭐️ Create Git tag](#%EF%B8%8F-create-git-tag)\n- [Tips and FAQ](#tips-and-faq)\n  - [⭐️ Create SSH Deploy Key](#%EF%B8%8F-create-ssh-deploy-key)\n  - [⭐️ First Deployment with `GITHUB_TOKEN`](#%EF%B8%8F-first-deployment-with-github_token)\n  - [⭐️ Use the latest and specific release](#%EF%B8%8F-use-the-latest-and-specific-release)\n  - [⭐️ Schedule and Manual Deployment](#%EF%B8%8F-schedule-and-manual-deployment)\n  - [⭐️ Release Strategy](#%EF%B8%8F-release-strategy)\n- [Examples](#examples)\n  - [⭐️ Static Site Generators with Node.js](#%EF%B8%8F-static-site-generators-with-nodejs)\n  - [⭐️ Gatsby](#%EF%B8%8F-gatsby)\n  - [⭐️ React and Next](#%EF%B8%8F-react-and-next)\n  - [⭐️ Vue and Nuxt](#%EF%B8%8F-vue-and-nuxt)\n  - [⭐️ Docusaurus](#%EF%B8%8F-docusaurus)\n  - [⭐️ Static Site Generators with Python](#%EF%B8%8F-static-site-generators-with-python)\n  - [⭐️ mdBook (Rust)](#%EF%B8%8F-mdbook-rust)\n  - [⭐️ Flutter Web](#%EF%B8%8F-flutter-web)\n  - [⭐️ Elm](#%EF%B8%8F-elm)\n  - [⭐️ Swift Publish](#%EF%B8%8F-swift-publish)\n- [License](#license)\n\n\u003c!-- END doctoc generated TOC please keep comment here to allow auto update --\u003e\n\n\n\n## Getting started\n\nAdd your workflow file `.github/workflows/gh-pages.yml` and push it to your remote default branch.\n\nHere is an example workflow for Hugo.\n\n- [peaceiris/actions-hugo: GitHub Actions for Hugo](https://github.com/peaceiris/actions-hugo)\n\n[![peaceiris/actions-hugo - GitHub](https://gh-card.dev/repos/peaceiris/actions-hugo.svg?fullname)](https://github.com/peaceiris/actions-hugo)\n\n```yaml\nname: GitHub Pages\n\non:\n  push:\n    branches:\n      - main  # Set a branch name to trigger deployment\n  pull_request:\n\njobs:\n  deploy:\n    runs-on: ubuntu-22.04\n    permissions:\n      contents: write\n    concurrency:\n      group: ${{ github.workflow }}-${{ github.ref }}\n    steps:\n      - uses: actions/checkout@v6\n        with:\n          submodules: true  # Fetch Hugo themes (true OR recursive)\n          fetch-depth: 0    # Fetch all history for .GitInfo and .Lastmod\n\n      - name: Setup Hugo\n        uses: peaceiris/actions-hugo@v2\n        with:\n          hugo-version: '0.110.0'\n\n      - name: Build\n        run: hugo --minify\n\n      - name: Deploy\n        uses: step-security/actions-gh-pages@v4\n        # If you're changing the branch from main,\n        # also change the `main` in `refs/heads/main`\n        # below accordingly.\n        if: github.ref == 'refs/heads/main'\n        with:\n          github_token: ${{ secrets.GITHUB_TOKEN }}\n          publish_dir: ./public\n```\n\n| Actions log overview | GitHub Pages log |\n|---|---|\n| ![](./images/log_overview.jpg) | ![](./images/log_success.jpg) |\n\n\u003cdiv align=\"right\"\u003e\n\u003ca href=\"#table-of-contents\"\u003eBack to TOC ☝️\u003c/a\u003e\n\u003c/div\u003e\n\n\n\n## Options\n\n### ⭐️ Set Runner's Access Token `github_token`\n\n**This option is for `GITHUB_TOKEN`, not a personal access token.**\n\nA GitHub Actions runner automatically creates a `GITHUB_TOKEN` secret to use in your workflow. You can use the `GITHUB_TOKEN` to authenticate in a workflow run.\n\n```yaml\n- name: Deploy\n  uses: step-security/actions-gh-pages@v4\n  with:\n    github_token: ${{ secrets.GITHUB_TOKEN }}\n    publish_dir: ./public\n```\n\nFor more details about `GITHUB_TOKEN`: [Automatic token authentication - GitHub Docs](https://docs.github.com/en/actions/security-guides/automatic-token-authentication)\n\n### ⭐️ Set SSH Private Key `deploy_key`\n\nRead [Create SSH Deploy Key](#%EF%B8%8F-create-ssh-deploy-key), create your SSH deploy key, and set the `deploy_key` option like the following.\n\n```yaml\n- name: Deploy\n  uses: step-security/actions-gh-pages@v4\n  with:\n    deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}\n    publish_dir: ./public\n    \n```\n\n### ⭐️ Set Personal Access Token `personal_token`\n\n[Generate a personal access token (`repo`)](https://github.com/settings/tokens) and add it to Secrets as `PERSONAL_TOKEN`, it works as well as `ACTIONS_DEPLOY_KEY`.\n\n```yaml\n- name: Deploy\n  uses: step-security/actions-gh-pages@v4\n  with:\n    personal_token: ${{ secrets.PERSONAL_TOKEN }}\n    publish_dir: ./public\n```\n\n### ⭐️ Set Another GitHub Pages Branch `publish_branch`\n\nSet a branch name to use as GitHub Pages branch.\nThe default is `gh-pages`.\n\n```yaml\n- name: Deploy\n  uses: step-security/actions-gh-pages@v4\n  with:\n    github_token: ${{ secrets.GITHUB_TOKEN }}\n    publish_branch: your-branch  # default: gh-pages\n```\n\n### ⭐️ Source Directory `publish_dir`\n\nA source directory to deploy to GitHub Pages. The default is `public`.\nOnly the contents of this dir are pushed to GitHub Pages branch, `gh-pages` by default.\n\n```yaml\n- name: Deploy\n  uses: step-security/actions-gh-pages@v4\n  with:\n    github_token: ${{ secrets.GITHUB_TOKEN }}\n    publish_dir: ./out  # default: public\n```\n\n### ⭐️ Deploy to Subdirectory `destination_dir`\n\n*This feature is on beta.*\n\nA destination subdirectory on a publishing branch. The default is empty.\n\n```yaml\n- name: Deploy\n  uses: step-security/actions-gh-pages@v4\n  with:\n    github_token: ${{ secrets.GITHUB_TOKEN }}\n    destination_dir: subdir\n```\n\n### ⭐️ Filter publishing assets `exclude_assets`\n\n*This feature is on beta.*\n\nSet files or directories to exclude from publishing assets.\nThe default is `.github`.\nValues should be split with a comma.\n\n```yaml\n- name: Deploy\n  uses: step-security/actions-gh-pages@v4\n  with:\n    github_token: ${{ secrets.GITHUB_TOKEN }}\n    exclude_assets: '.github,exclude-file1,exclude-file2'\n```\n\nSet `exclude_assets` to empty for including the `.github` directory to deployment assets.\n\n```yaml\n- name: Deploy\n  uses: step-security/actions-gh-pages@v4\n  with:\n    deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}   # Recommended for this usage\n    # personal_token: ${{ secrets.PERSONAL_TOKEN }} # An alternative\n    # github_token: ${{ secrets.GITHUB_TOKEN }}     # This does not work for this usage\n    exclude_assets: ''\n```\n\nThe `exclude_assets` option supports glob patterns.\n\n```yaml\n- name: Deploy\n  uses: step-security/actions-gh-pages@v4\n  with:\n    github_token: ${{ secrets.GITHUB_TOKEN }}\n    exclude_assets: '.github,exclude-file.txt,exclude-dir/**.txt'\n```\n\n### ⭐️ Add CNAME file `cname`\n\nTo add the `CNAME` file, we can set the `cname` option.\nAlternatively, put your `CNAME` file into your `publish_dir`. (e.g. `public/CNAME`)\n\nFor more details about the `CNAME` file, read the official documentation: [Managing a custom domain for your GitHub Pages site - GitHub Docs](https://docs.github.com/en/pages/configuring-a-custom-domain-for-your-github-pages-site/managing-a-custom-domain-for-your-github-pages-site)\n\n```yaml\n- name: Deploy\n  uses: step-security/actions-gh-pages@v4\n  with:\n    github_token: ${{ secrets.GITHUB_TOKEN }}\n    publish_dir: ./public\n    cname: github.com\n```\n\n### ⭐️ Enable Built-in Jekyll `enable_jekyll`\n\nIf you want GitHub Pages to process your site with the static site generator Jekyll, set `enable_jekyll` to true.\n\nBy default, this action signals to GitHub Pages that the site shall not be processed with Jekyll. This is done by adding an empty `.nojekyll` file on your publishing branch. When that file already exists, this action does nothing.\n\nBypassing Jekyll makes the deployment faster and is necessary if you are deploying files or directories that start with underscores, since Jekyll considers these to be special resources and does not copy them to the final site. You only need to set `enable_jekyll` to true when you want to deploy a Jekyll-powered website and let GitHub Pages do the Jekyll processing.\n\n\n```yaml\n- name: Deploy\n  uses: step-security/actions-gh-pages@v4\n  with:\n    github_token: ${{ secrets.GITHUB_TOKEN }}\n    publish_dir: ./public\n    enable_jekyll: true\n```\n\nFor more details about `.nojekyll`: [Bypassing Jekyll on GitHub Pages - The GitHub Blog](https://github.blog/2009-12-29-bypassing-jekyll-on-github-pages/)\n\n### ⭐️ Allow empty commits `allow_empty_commit`\n\nBy default, a commit will not be generated when no file changes. If you want to allow an empty commit, set the optional parameter `allow_empty_commit` to `true`.\n\nFor example:\n\n```yaml\n- name: Deploy\n  uses: step-security/actions-gh-pages@v4\n  with:\n    github_token: ${{ secrets.GITHUB_TOKEN }}\n    publish_dir: ./public\n    allow_empty_commit: true\n```\n\n### ⭐️ Keeping existing files `keep_files`\n\nBy default, existing files in the publish branch (or only in `destination_dir` if given) will be removed. If you want the action to add new files but leave existing ones untouched, set the optional parameter `keep_files` to `true`.\n\nNote that users who are using a Static Site Generator do not need this option in most cases. Please reconsider your project structure and building scripts, or use a built-in feature of a Static Site Generator before you enable this flag.\n\n- [Static Files | Hugo](https://gohugo.io/content-management/static-files/)\n- [Using the Static Folder | Gatsby](https://www.gatsbyjs.com/docs/how-to/images-and-media/static-folder/)\n\nFor example:\n\n```yaml\n- name: Deploy\n  uses: step-security/actions-gh-pages@v4\n  with:\n    github_token: ${{ secrets.GITHUB_TOKEN }}\n    publish_dir: ./public\n    keep_files: true\n```\n\n### ⭐️ Deploy to external repository `external_repository`\n\nBy default, your files are published to the repository which is running this action.\nIf you want to publish to another repository on GitHub, set the environment variable `external_repository` to `\u003cusername\u003e/\u003cexternal-repository\u003e`.\n\nFor example:\n\n```yaml\n- name: Deploy\n  uses: step-security/actions-gh-pages@v4\n  with:\n    deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}\n    external_repository: username/external-repository\n    publish_branch: your-branch  # default: gh-pages\n    publish_dir: ./public\n```\n\nYou can use `deploy_key` or `personal_token`.\nWhen you use `deploy_key`, set your private key to the repository which includes this action and set your public key to your external repository.\n\n**Note that `GITHUB_TOKEN` has no permission to access to external repositories. Please create a personal access token and set it to `personal_token` like `personal_token: ${{ secrets.PERSONAL_TOKEN }}`.**\n\nUse case:\n\nA GitHub Free Plan account cannot use the GitHub Pages in a private repository. To make your source contents private and deploy it with the GitHub Pages, you can deploy your site from a private repository to a public repository using this option.\n\n### ⭐️ Force orphan `force_orphan`\n\nWe can set the `force_orphan: true` option.\nThis allows you to make your publish branch with only the latest commit.\n\n```yaml\n- name: Deploy\n  uses: step-security/actions-gh-pages@v4\n  with:\n    github_token: ${{ secrets.GITHUB_TOKEN }}\n    publish_dir: ./public\n    force_orphan: true\n```\n\n### ⭐️ Set Git username and email\n\nSet custom `git config user.name` and `git config user.email`.\nA commit is always created with the same user.\n\n```yaml\n- name: Deploy\n  uses: step-security/actions-gh-pages@v4\n  with:\n    github_token: ${{ secrets.GITHUB_TOKEN }}\n    publish_dir: ./public\n    user_name: 'github-actions[bot]'\n    user_email: 'github-actions[bot]@users.noreply.github.com'\n```\n\n\u003cimg width=\"400px\" alt=\"Add GitHub Actions bot as a committer\" src=\"./images/committer_github_actions_bot.jpg\"\u003e\n\n### ⭐️ Set custom commit message\n\nSet a custom commit message.\nWhen we create a commit with a message `docs: Update some post`, a deployment commit will be generated with a message `docs: Update some post ${GITHUB_SHA}`.\n\n```yaml\n- name: Deploy\n  uses: step-security/actions-gh-pages@v4\n  with:\n    github_token: ${{ secrets.GITHUB_TOKEN }}\n    publish_dir: ./public\n    commit_message: ${{ github.event.head_commit.message }}\n```\n\n\u003cimg width=\"400px\" alt=\"Set a custom commit message - GitHub Actions for GitHub Pages\" src=\"./images/commit_message.jpg\"\u003e\n\nTo set a full custom commit message without a triggered commit hash,\nuse the `full_commit_message` option instead of the `commit_message` option.\n\n```yaml\n- name: Deploy\n  uses: step-security/actions-gh-pages@v4\n  with:\n    github_token: ${{ secrets.GITHUB_TOKEN }}\n    publish_dir: ./public\n    full_commit_message: ${{ github.event.head_commit.message }}\n```\n\n### ⭐️ Create Git tag\n\nHere is an example workflow.\n\n```yaml\nname: GitHub Pages\n\non:\n  push:\n    branches:\n      - main\n    tags:\n      - 'v*.*.*'\n\njobs:\n  deploy:\n    runs-on: ubuntu-22.04\n    permissions:\n      contents: write\n    concurrency:\n      group: ${{ github.workflow }}-${{ github.ref }}\n    steps:\n      - uses: actions/checkout@v6\n\n      - name: Some build\n\n      - name: Prepare tag\n        id: prepare_tag\n        if: startsWith(github.ref, 'refs/tags/')\n        run: |\n          echo \"DEPLOY_TAG_NAME=deploy-${TAG_NAME}\" \u003e\u003e \"${GITHUB_OUTPUT}\"\n\n      - name: Deploy\n        uses: step-security/actions-gh-pages@v4\n        with:\n          github_token: ${{ secrets.GITHUB_TOKEN }}\n          publish_dir: ./public\n          tag_name: ${{ steps.prepare_tag.outputs.DEPLOY_TAG_NAME }}\n          tag_message: 'Deployment ${{ github.ref_name }}'\n```\n\nCommands on a local machine.\n\n```console\n$ # On a main branch\n$ git tag -a \"v1.2.3\" -m \"Release v1.2.3\"\n$ git push origin \"v1.2.3\"\n\n$ # After deployment\n$ git fetch origin\n$ git tag\ndeploy-v1.2.3  # Tag on the gh-pages branch\nv1.2.3         # Tag on the main branch\n```\n\n\u003cdiv align=\"right\"\u003e\n\u003ca href=\"#table-of-contents\"\u003eBack to TOC ☝️\u003c/a\u003e\n\u003c/div\u003e\n\n\n\n## Tips and FAQ\n\n### ⭐️ Create SSH Deploy Key\n\nGenerate your deploy key with the following command.\n\n```sh\nssh-keygen -t rsa -b 4096 -C \"$(git config user.email)\" -f gh-pages -N \"\"\n```\n\nYou will get 2 files:\n\n- `gh-pages.pub` is a public key\n- `gh-pages` is a private key\n\nNext, Go to **Repository Settings**\n\n- Go to **Deploy Keys** and add your public key with the **Allow write access**\n- Go to **Secrets** and add your private key as `ACTIONS_DEPLOY_KEY`\n\n| Add your public key | Success |\n|---|---|\n| ![](./images/deploy-keys-1.jpg) | ![](./images/deploy-keys-2.jpg) |\n\n| Add your private key | Success |\n|---|---|\n| ![](./images/secrets-1.jpg) | ![](./images/secrets-2.jpg) |\n\n### ⭐️ First Deployment with `GITHUB_TOKEN`\n\nThe `GITHUB_TOKEN` has limitations for the first deployment so we have to select the GitHub Pages branch on the repository settings tab. After that, do the second deployment like the following pictures.\n\n| First deployment failed | Go to the settings tab |\n|---|---|\n| ![](./images/log_first_deployment_failed_with_github_token.jpg) | ![](./images/settings_inactive.jpg) |\n\n| Select branch | Deploying again and succeed |\n|---|---|\n| ![](./images/settings_select.jpg) | ![](./images/log_success.jpg) |\n\nIf the action fails to push the commit or tag with the following error:\n\n```txt\n/usr/bin/git push origin gh-pages\nremote: Write access to repository not granted.\nfatal: unable to access 'https://github.com/username/repository.git/': The requested URL returned error: 403\nError: Action failed with \"The process '/usr/bin/git' failed with exit code 128\"\n```\n\nPlease add the write permission to the [`permissions.contents` in a workflow/job](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions).\n\n```yaml\npermissions:\n  contents: write\n```\n\nAlternatively, you can [configure the default `GITHUB_TOKEN` permissions](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#configuring-the-default-github_token-permissions) by selecting read and write permissions.\n\n\n### ⭐️ Use the latest and specific release\n\nWe recommend you to use the latest and specific release of this action for stable CI/CD.\nIt is useful to watch this repository (release only) to check the [latest release] of this action.\n\n[latest release]: https://github.com/step-security/actions-gh-pages/releases\n\nFor continuous updating, we can use the GitHub native Dependabot.\nHere is an example configuration of the bot. The config file is located in `.github/dependabot.yml`.\n\n```yaml\nversion: 2\nupdates:\n- package-ecosystem: \"github-actions\"\n  directory: \"/\"\n  schedule:\n    interval: \"daily\"\n  labels:\n  - \"CI/CD\"\n  commit-message:\n    prefix: ci\n```\n\nSee the official documentation for more details about the Dependabot: [Keeping your dependencies updated automatically - GitHub Docs](https://docs.github.com/en/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically)\n\n### ⭐️ Schedule and Manual Deployment\n\nFor deploying regularly, we can set the `on.schedule` workflow trigger.\nSee [Scheduled events | Events that trigger workflows - GitHub Docs](https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows#scheduled-events)\n\nFor deploying manually, we can set the `on.workflow_dispatch` workflow trigger.\nSee [Manual events `workflow_dispatch` | Events that trigger workflows - GitHub Docs](https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows#manual-events)\n\n```yaml\nname: GitHub Pages\n\non:\n  push:\n    branches:\n      - main\n  schedule:\n    - cron: \"22 22 * * *\"\n  workflow_dispatch:\n\njobs:\n  deploy:\n    runs-on: ubuntu-22.04\n    permissions:\n      contents: write\n    concurrency:\n      group: ${{ github.workflow }}-${{ github.ref }}\n    steps:\n    ...\n```\n\n\u003cdiv align=\"right\"\u003e\n\u003ca href=\"#table-of-contents\"\u003eBack to TOC ☝️\u003c/a\u003e\n\u003c/div\u003e\n\n\n\n## Examples\n\n### ⭐️ Static Site Generators with Node.js\n\n[hexo], [vuepress], [react-static], [gridsome], [create-react-app] and so on.\nPlease check where your output directory is before pushing your workflow.\ne.g. `create-react-app` requires `publish_dir` to be set to `./build`\n\n[hexo]: https://github.com/hexojs/hexo\n[vuepress]: https://github.com/vuejs/vuepress\n[react-static]: https://github.com/react-static/react-static\n[gridsome]: https://github.com/gridsome/gridsome\n[create-react-app]: https://github.com/facebook/create-react-app\n\nPremise: Dependencies are managed by `package.json` and `package-lock.json`\n\n```yaml\nname: GitHub Pages\n\non:\n  push:\n    branches:\n      - main\n  pull_request:\n\njobs:\n  deploy:\n    runs-on: ubuntu-22.04\n    permissions:\n      contents: write\n    concurrency:\n      group: ${{ github.workflow }}-${{ github.ref }}\n    steps:\n      - uses: actions/checkout@v6\n\n      - name: Setup Node\n        uses: actions/setup-node@v6\n        with:\n          node-version: '24'\n\n      - name: Cache dependencies\n        uses: actions/cache@v5\n        with:\n          path: ~/.npm\n          key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}\n          restore-keys: |\n            ${{ runner.os }}-node-\n\n      - run: npm ci\n      - run: npm run build\n\n      - name: Deploy\n        uses: step-security/actions-gh-pages@v4\n        if: github.ref == 'refs/heads/main'\n        with:\n          github_token: ${{ secrets.GITHUB_TOKEN }}\n          publish_dir: ./public\n```\n\n### ⭐️ Gatsby\n\nAn example for [Gatsby] (Gatsby.js) project with [gatsby-starter-blog]\n\n[Gatsby]: https://github.com/gatsbyjs/gatsby\n[gatsby-starter-blog]: https://github.com/gatsbyjs/gatsby-starter-blog\n\n```yaml\nname: GitHub Pages\n\non:\n  push:\n    branches:\n      - main\n  pull_request:\n\njobs:\n  deploy:\n    runs-on: ubuntu-22.04\n    permissions:\n      contents: write\n    concurrency:\n      group: ${{ github.workflow }}-${{ github.ref }}\n    steps:\n      - uses: actions/checkout@v6\n\n      - name: Setup Node\n        uses: actions/setup-node@v6\n        with:\n          node-version: '24'\n\n      - name: Cache dependencies\n        uses: actions/cache@v5\n        with:\n          path: ~/.npm\n          key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}\n          restore-keys: |\n            ${{ runner.os }}-node-\n\n      - run: npm ci\n      - run: npm run format\n      - run: npm run test\n      - run: npm run build\n\n      - name: Deploy\n        uses: step-security/actions-gh-pages@v4\n        if: github.ref == 'refs/heads/main'\n        with:\n          github_token: ${{ secrets.GITHUB_TOKEN }}\n          publish_dir: ./public\n```\n\n### ⭐️ React and Next\n\nAn example for [Next.js] (React.js) project with [create-next-app]\n\n[Next.js]: https://github.com/vercel/next.js\n[create-next-app]: https://nextjs.org/docs\n\n```yaml\nname: GitHub Pages\n\non:\n  push:\n    branches:\n      - main\n  pull_request:\n\njobs:\n  deploy:\n    runs-on: ubuntu-22.04\n    permissions:\n      contents: write\n    concurrency:\n      group: ${{ github.workflow }}-${{ github.ref }}\n    steps:\n      - uses: actions/checkout@v6\n\n      - name: Setup Node\n        uses: actions/setup-node@v6\n        with:\n          node-version: '24'\n\n      - name: Get yarn cache\n        id: yarn-cache\n        run: echo \"YARN_CACHE_DIR=$(yarn cache dir)\" \u003e\u003e \"${GITHUB_OUTPUT}\"\n\n      - name: Cache dependencies\n        uses: actions/cache@v5\n        with:\n          path: ${{ steps.yarn-cache.outputs.YARN_CACHE_DIR }}\n          key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}\n          restore-keys: |\n            ${{ runner.os }}-yarn-\n\n      - run: yarn install --frozen-lockfile\n      - run: yarn build\n      - run: yarn export\n\n      - name: Deploy\n        uses: step-security/actions-gh-pages@v4\n        if: github.ref == 'refs/heads/main'\n        with:\n          github_token: ${{ secrets.GITHUB_TOKEN }}\n          publish_dir: ./out\n```\n\n### ⭐️ Vue and Nuxt\n\nAn example for [Nuxt.js] (Vue.js) project with [create-nuxt-app]\n\n- cf. [Nuxt - GitHub Pages](https://nuxtjs.org/deployments/github-pages)\n\n[Nuxt.js]: https://github.com/nuxt/nuxt.js\n[create-nuxt-app]: https://github.com/nuxt/create-nuxt-app\n\n```yaml\nname: GitHub Pages\n\non:\n  push:\n    branches:\n      - main\n  pull_request:\n\njobs:\n  deploy:\n    runs-on: ubuntu-22.04\n    permissions:\n      contents: write\n    concurrency:\n      group: ${{ github.workflow }}-${{ github.ref }}\n    steps:\n      - uses: actions/checkout@v6\n\n      - name: Setup Node\n        uses: actions/setup-node@v6\n        with:\n          node-version: '24'\n\n      - name: Cache dependencies\n        uses: actions/cache@v5\n        with:\n          path: ~/.npm\n          key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}\n          restore-keys: |\n            ${{ runner.os }}-node-\n\n      - run: npm ci\n      - run: npm test\n      - run: npm run generate\n\n      - name: deploy\n        uses: step-security/actions-gh-pages@v4\n        if: github.ref == 'refs/heads/main'\n        with:\n          github_token: ${{ secrets.GITHUB_TOKEN }}\n          publish_dir: ./dist\n```\n\n### ⭐️ Docusaurus\n\nAn example workflow for [Docusaurus](https://docusaurus.io/).\n\n`npx @docusaurus/init@next init website classic` is useful to create a new Docusaurus project.\n\n```yaml\n# .github/workflows/deploy.yml\n\nname: GitHub Pages\n\non:\n  push:\n    branches:\n      - main\n    paths:\n      - '.github/workflows/deploy.yml'\n      - 'website/**'\n  pull_request:\n\njobs:\n  deploy:\n    runs-on: ubuntu-22.04\n    permissions:\n      contents: write\n    concurrency:\n      group: ${{ github.workflow }}-${{ github.ref }}\n    defaults:\n      run:\n        working-directory: website\n    steps:\n      - uses: actions/checkout@v6\n\n      - name: Setup Node\n        uses: actions/setup-node@v6\n        with:\n          node-version: '24'\n\n      - name: Get yarn cache\n        id: yarn-cache\n        run: echo \"YARN_CACHE_DIR=$(yarn cache dir)\" \u003e\u003e \"${GITHUB_OUTPUT}\"\n\n      - name: Cache dependencies\n        uses: actions/cache@v5\n        with:\n          path: ${{ steps.yarn-cache.outputs.YARN_CACHE_DIR }}\n          key: ${{ runner.os }}-website-${{ hashFiles('**/yarn.lock') }}\n          restore-keys: |\n            ${{ runner.os }}-website-\n\n      - run: yarn install --frozen-lockfile\n      - run: yarn build\n\n      - name: Deploy\n        uses: step-security/actions-gh-pages@v4\n        if: github.ref == 'refs/heads/main'\n        with:\n          github_token: ${{ secrets.GITHUB_TOKEN }}\n          publish_dir: ./website/build\n```\n\n### ⭐️ Static Site Generators with Python\n\n[pelican], [MkDocs], [sphinx], and so on.\n\n[pelican]: https://github.com/getpelican/pelican\n[MkDocs]: https://github.com/mkdocs/mkdocs\n[sphinx]: https://github.com/sphinx-doc/sphinx\n\nPremise: Dependencies are managed by `requirements.txt`\n\n```yaml\nname: GitHub Pages\n\non:\n  push:\n    branches:\n      - main\n  pull_request:\n\njobs:\n  deploy:\n    runs-on: ubuntu-22.04\n    permissions:\n      contents: write\n    concurrency:\n      group: ${{ github.workflow }}-${{ github.ref }}\n    steps:\n      - uses: actions/checkout@v6\n\n      - name: Setup Python\n        uses: actions/setup-python@v6\n        with:\n          python-version: '3.13'\n\n      - name: Upgrade pip\n        run: |\n          # install pip=\u003e20.1 to use \"pip cache dir\"\n          python3 -m pip install --upgrade pip\n\n      - name: Get pip cache dir\n        id: pip-cache\n        run: echo \"dir=$(pip cache dir)\" \u003e\u003e $GITHUB_OUTPUT\n\n      - name: Cache dependencies\n        uses: actions/cache@v5\n        with:\n          path: ${{ steps.pip-cache.outputs.dir }}\n          key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}\n          restore-keys: |\n            ${{ runner.os }}-pip-\n\n      - name: Install dependencies\n        run: python3 -m pip install -r ./requirements.txt\n\n      - run: mkdocs build\n\n      - name: Deploy\n        uses: step-security/actions-gh-pages@v4\n        if: github.ref == 'refs/heads/main'\n        with:\n          github_token: ${{ secrets.GITHUB_TOKEN }}\n          publish_dir: ./site\n```\n\n### ⭐️ mdBook (Rust)\n\nAn example GitHub Actions workflow to deploy [rust-lang/mdBook] site to GitHub Pages.\n\n[rust-lang/mdBook]: https://github.com/rust-lang/mdBook\n\n- [peaceiris/actions-mdbook: GitHub Actions for mdBook (rust-lang/mdBook)](https://github.com/peaceiris/actions-mdbook)\n\n```yaml\nname: GitHub Pages\n\non:\n  push:\n    branches:\n      - main\n  pull_request:\n\njobs:\n  deploy:\n    runs-on: ubuntu-22.04\n    permissions:\n      contents: write\n    concurrency:\n      group: ${{ github.workflow }}-${{ github.ref }}\n    steps:\n      - uses: actions/checkout@v6\n\n      - name: Setup mdBook\n        uses: peaceiris/actions-mdbook@v1\n        with:\n          mdbook-version: '0.4.8'\n          # mdbook-version: 'latest'\n\n      - run: mdbook build\n\n      - name: Deploy\n        uses: step-security/actions-gh-pages@v4\n        if: github.ref == 'refs/heads/main'\n        with:\n          github_token: ${{ secrets.GITHUB_TOKEN }}\n          publish_dir: ./book\n```\n\nHint: you may want to publish your rustdocs. And use relative links to it from the md docs, and have them checked by `mdbook`.\nThen, according to the [doc](https://rust-lang.github.io/mdBook/guide/creating.html#source-files), you may put `./target/doc/`\nto your `./book/src` dir before you `mdbook build` and then it will end up in `./book/html/` and in your Github Pages.\n\n### ⭐️ Flutter Web\n\nAn example workflow for [Flutter web project].\n\n[Flutter web project]: https://flutter.dev/docs/get-started/web\n\n```yaml\nname: GitHub Pages\n\non:\n  push:\n    branches:\n      - main\n  pull_request:\n\njobs:\n  deploy:\n    runs-on: ubuntu-22.04\n    permissions:\n      contents: write\n    concurrency:\n      group: ${{ github.workflow }}-${{ github.ref }}\n    steps:\n      - uses: actions/checkout@v6\n\n      - name: Setup Flutter\n        run: |\n          git clone https://github.com/flutter/flutter.git --depth 1 -b beta _flutter\n          echo \"${GITHUB_WORKSPACE}/_flutter/bin\" \u003e\u003e ${GITHUB_PATH}\n\n      - name: Install\n        run: |\n          flutter config --enable-web\n          flutter pub get\n\n      - name: Build\n        run: flutter build web\n\n      - name: Deploy\n        uses: step-security/actions-gh-pages@v4\n        if: github.ref == 'refs/heads/main'\n        with:\n          github_token: ${{ secrets.GITHUB_TOKEN }}\n          publish_dir: ./build/web\n```\n\n### ⭐️ Elm\n\nAn example workflow for [Elm].\n\n[Elm]: https://elm-lang.org\n\n```yaml\nname: GitHub Pages\n\non:\n  push:\n    branches:\n      - main\n  pull_request:\n\njobs:\n  deploy:\n    runs-on: ubuntu-22.04\n    permissions:\n      contents: write\n    concurrency:\n      group: ${{ github.workflow }}-${{ github.ref }}\n    steps:\n      - uses: actions/checkout@v6\n\n      - name: Setup Node\n        uses: actions/setup-node@v6\n        with:\n          node-version: '24'\n\n      - name: Setup Elm\n        run: npm install elm --global\n\n      - name: Make\n        run: elm make --optimize src/Main.elm\n\n      - name: Move files\n        run: |\n          mkdir ./public\n          mv ./index.html ./public/\n        # If you have non-minimal setup with some assets and separate html/js files,\n        # provide --output=\u003coutput-file\u003e option for `elm make` and remove this step\n\n      - name: Deploy\n        uses: step-security/actions-gh-pages@v4\n        if: github.ref == 'refs/heads/main'\n        with:\n          github_token: ${{ secrets.GITHUB_TOKEN }}\n          publish_dir: ./public\n```\n\n### ⭐️ Swift Publish\n\nAn example workflow for [JohnSundell/Publish].\n\n[JohnSundell/Publish]: https://github.com/JohnSundell/Publish\n\n```yaml\nname: GitHub Pages\n\non:\n  push:\n    branches:\n      - main\n  pull_request:\n\njobs:\n  deploy:\n    runs-on: macos-latest\n    concurrency:\n      group: ${{ github.workflow }}-${{ github.ref }}\n    steps:\n      - uses: actions/checkout@v6\n\n      - uses: actions/cache@v5\n        with:\n          path: |\n            ~/Publish_build\n            .build\n          key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}\n          restore-keys: |\n            ${{ runner.os }}-spm-\n\n      - name: Setup JohnSundell/Publish\n        run: |\n          cd ${HOME}\n          export PUBLISH_VERSION=\"0.7.0\"\n          git clone https://github.com/JohnSundell/Publish.git\n          cd ./Publish \u0026\u0026 git checkout ${PUBLISH_VERSION}\n          mv ~/Publish_build .build || true\n          swift build -c release\n          cp -r .build ~/Publish_build || true\n          echo \"${HOME}/Publish/.build/release\" \u003e\u003e ${GITHUB_PATH}\n\n      - run: publish-cli generate\n\n      - name: Deploy to GitHub Pages\n        uses: step-security/actions-gh-pages@v4\n        if: github.ref == 'refs/heads/main'\n        with:\n          github_token: ${{ secrets.GITHUB_TOKEN }}\n          publish_dir: ./Output\n```\n\n\u003cdiv align=\"right\"\u003e\n\u003ca href=\"#table-of-contents\"\u003eBack to TOC ☝️\u003c/a\u003e\n\u003c/div\u003e\n\n\n\n## License\n\n- [MIT License - step-security/actions-gh-pages]\n\n[MIT License - step-security/actions-gh-pages]: https://github.com/step-security/actions-gh-pages/blob/main/LICENSE\n\n\n\u003cdiv align=\"right\"\u003e\n\u003ca href=\"#table-of-contents\"\u003eBack to TOC ☝️\u003c/a\u003e\n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstep-security%2Factions-gh-pages","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstep-security%2Factions-gh-pages","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstep-security%2Factions-gh-pages/lists"}