Skip to content

GitHub Action to build and deploy a Github Pages site using the build command & output folder you specify.

License

Notifications You must be signed in to change notification settings

jinjat-data/gh-pages-deploy-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Github Pages Custom Deploy

GitHub Action to build and deploy a Github Pages site using the build command & output folder you specify.

Usage

This GitHub Action will run the build command you specify at the root of your repository and deploy it to GitHub Pages for you! Here's a basic workflow example:

# .github/workflows/main.yml

name: Github Pages Publish

on:
  push:
    branches:
      - master

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: jinjat-data/[email protected]
        with:
          access-token: ${{ secrets.GITHUB_TOKEN }}
          source-directory: public

Options

Name Description Required? (default)
access-token Required to push chages to your deployment branch. You can get this from your Github Settings > Developer Settings > Personal Access Tokens Yes
source-directory The name of the subfolder that holds the contents of the site you want deployed. This folder can be generated by your build command, or pre-exist. Yes
deploy-branch The branch Github Pages is setup to source your site's files from. For the yourname.github.io site, this is typically the master branch. For /reponame subfolder deploys, gh-pages is the default. No (gh-pages)
custom-domain This is the domain that this Action will write to a CNAME file for you on your deploy branch, to enable a custom domain for your Github Pages site. No

Related

This is based on a Gatsby-specific action written by Enrique Gonzalez 🙏

About

GitHub Action to build and deploy a Github Pages site using the build command & output folder you specify.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%