GitHub Pages

For an easier way to publish your Plasmic project, consider Plasmic hosting.

The GitHub push action previously supported a feature for setting up GitHub Pages, but the feature stopped working in October 2022 because GitHub revoked access to an API the feature depended on for a security fix. If you want to continue using GitHub Pages, this page is for you.

Set up GitHub Pages

Note this workflow depends on github-pages-deploy-action by JamesIves.

  1. Create an empty branch called gh-pages. We recommend following this GitHub Gist from ramnathv.
  2. Navigate to your GitHub Pages settings. In your repository, click “Settings” and, under “Code and automation”, click “Pages”.
  3. Set up your “Build and deployment” information.
    • For “Source”, choose “Deploy from a branch”.
    • For “Branch”, choose your newly created gh-pages branch and the ”/ (root)” directory.
    • Click “Save”.
  4. Enter your custom domain name and follow the GitHub Pages instructions for configuring a custom domain and click “Save”.
  5. (Recommended) Check “Enforce HTTPS”.
  6. Add a .github/workflows/plasmic-push.yml file with the following content to the main branch:
name: Build and deploy Plasmic app
- main
name: Build and deploy
runs-on: ubuntu-latest
- id: checkout
name: Check out repository
uses: actions/checkout@v2
persist-credentials: false
fetch-depth: 0
- id: node
name: Set up node v16
uses: actions/setup-node@v2
node-version: '16'
- id: cache
name: Recover cache
uses: actions/cache@v2
key: lock-${{ hashFiles('package-lock.json', 'yarn.lock') }}
path: node_modules
- id: build
name: Build Plasmic app
uses: plasmicapp/plasmic-action@master
run: build
branch: main
skip_if_plasmic: true
- id: gh-pages
name: Publish to GitHub Pages
uses: JamesIves/github-pages-deploy-action@4.1.0
if: ${{ }}
branch: gh-pages
folder: ${{ }}
Was this page helpful?

Have feedback on this page? Let us know on our forum.