Skip to content
activity

GitHub Action

Publish to GitHub Pages

v1.0.2 Latest version

Publish to GitHub Pages

activity

Publish to GitHub Pages

A GitHub Action to publish static website using GitHub Pages

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Publish to GitHub Pages

uses: tsunematsu21/[email protected]

Learn more about this action in tsunematsu21/actions-publish-gh-pages

Choose a version

Publish to GitHub Pages 🍣

GitHub release (latest by date including pre-releases) GitHub

A GitHub Action to publish static website using GitHub Pages.
This Action provides publish arbitrary directory that contains static content in your workflow to the GitHub Pages.

Usage

Inputs

  • dir - The directory that containing the content to be published. Can be specified as an absolute path or a relative path from the $GITHUB_WORKSPACE.
  • branch - The remote branch that publishing source for GitHub Pages site, defaults to gh-pages.
  • repo - The remote repository slug that publishing source for GitHub Pages site, defaults to current repo. The slug is formatted like user/repo-name.
  • token - The personal access token that authorize access to repo. (cf. GitHub Help)
  • name - The committer name, defaults to $GITHUB_ACTOR.
  • email - The committer name, defaults to ${GITHUB_ACTOR}@users.noreply.github.com.

Example workflow

name: Publish to GitHub Pages

on:
  push:
    branches:
      - master

jobs:
  publish:
    runs-on: ubuntu-latest
    steps:
      - name: Check out
        uses: actions/checkout@v1

      - name: Generate your awesome content
        run: # Your amazing generate action

      - name: Publish generated content to GitHub Pages
        uses: tsunematsu21/[email protected]
        with:
          dir: dist
          branch: gh-pages
          token: ${{ secrets.ACCESS_TOKEN }}

Document

Actions Status

Reference the documentation generated by TypeDoc and published to GitHub Pages by this action.

License

The scripts and documentation in this project are released under the MIT License