Skip to content

Static.app Deploy

Actions
Deploy your static site or built application to Static.app
v1.0.0
Latest
Star (1)

Static.app Deploy Action

Deploy your static sites and built applications to Static.app directly from GitHub Actions.

Features

  • 🚀 Easy deployment - Deploy static sites with a single action
  • 🔧 Build support - Automatically build your application before deployment
  • 🆕 Create or update - Create new sites or update existing ones
  • 📦 Smart packaging - Automatically excludes unnecessary files
  • 🎯 Flexible - Works with any static site generator or build tool

Usage

Basic Static Site Deployment

name: Deploy to Static.app
on:
  push:
    branches: [ main ]

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      
      - name: Deploy to Static.app
        uses: designmodo/[email protected]
        with:
          api-key: ${{ secrets.STATIC_APP_API_KEY }}
          build-dir: './'

Deploy Built Application (React, Vue, etc.)

name: Deploy Built App
on:
  push:
    branches: [ main ]

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      
      - name: Deploy to Static.app
        uses: designmodo/[email protected]
        with:
          api-key: ${{ secrets.STATIC_APP_API_KEY }}
          build-dir: 'dist'
          build-command: 'npm run build'
          install-command: 'npm ci'
          node-version: '18'

Update Existing Site (using PID)

name: Update Existing Site
on:
  push:
    branches: [ main ]

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      
      - name: Deploy to Static.app
        uses: designmodo/[email protected]
        with:
          api-key: ${{ secrets.STATIC_APP_API_KEY }}
          pid: 'ols2my1htk'
          build-dir: 'build'
          build-command: 'npm run build'

Inputs

Input Description Required Default
api-key Your Static.app API key -
pid Project PID to update (find in Site → Settings → General) -
build-dir Directory to deploy ./
build-command Build command to run before deployment -
install-command Install command to run before build npm ci
node-version Node.js version to use 18
exclude Files/directories to exclude (comma-separated) node_modules,.git,.github,*.md,package*.json

Outputs

Output Description
site-url The URL of the deployed site
deploy-url The deployment URL

Setup

1. Get Your API Key

  1. Go to Static.app
  2. Sign in to your account
  3. Navigate to Account → API Keys
  4. Create a new API key
  5. Copy the generated key (starts with sk_)

2. Add API Key to GitHub Secrets

  1. Go to your GitHub repository
  2. Navigate to Settings → Secrets and variables → Actions
  3. Click New repository secret
  4. Name: STATIC_APP_API_KEY
  5. Value: Your API key from Static.app
  6. Click Add secret

3. Create Workflow File

Create .github/workflows/deploy.yml in your repository:

name: Deploy to Static.app

on:
  push:
    branches: [ main ]

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v3
      
      - name: Deploy to Static.app
        uses: designmodo/[email protected]
        with:
          api-key: ${{ secrets.STATIC_APP_API_KEY }}
          # Add other inputs as needed

Examples

React App

- name: Deploy React App
  uses: designmodo/[email protected]
  with:
    api-key: ${{ secrets.STATIC_APP_API_KEY }}
    build-dir: 'build'
    build-command: 'npm run build'
    install-command: 'npm ci'

Vue.js App

- name: Deploy Vue App
  uses: designmodo/[email protected]
  with:
    api-key: ${{ secrets.STATIC_APP_API_KEY }}
    build-dir: 'dist'
    build-command: 'npm run build'

Next.js Static Export

- name: Deploy Next.js App
  uses: designmodo/[email protected]
  with:
    api-key: ${{ secrets.STATIC_APP_API_KEY }}
    build-dir: 'out'
    build-command: 'npm run build && npm run export'

Gatsby

- name: Deploy Gatsby Site
  uses: designmodo/[email protected]
  with:
    api-key: ${{ secrets.STATIC_APP_API_KEY }}
    build-dir: 'public'
    build-command: 'npm run build'

Hugo

- name: Deploy Hugo Site
  uses: designmodo/[email protected]
  with:
    api-key: ${{ secrets.STATIC_APP_API_KEY }}
    build-dir: 'public'
    build-command: 'hugo --minify'
    install-command: 'echo "No npm install needed"'

Jekyll

- name: Deploy Jekyll Site
  uses: designmodo/[email protected]
  with:
    api-key: ${{ secrets.STATIC_APP_API_KEY }}
    build-dir: '_site'
    build-command: 'bundle exec jekyll build'
    install-command: 'bundle install'

Advanced Configuration

Custom Exclusions

- name: Deploy with Custom Exclusions
  uses: designmodo/[email protected]
  with:
    api-key: ${{ secrets.STATIC_APP_API_KEY }}
    exclude: 'node_modules,.git,*.log,temp,cache'

Multiple Node.js Versions

strategy:
  matrix:
    node-version: [16, 18, 20]

- name: Deploy with Node ${{ matrix.node-version }}
  uses: designmodo/[email protected]
  with:
    api-key: ${{ secrets.STATIC_APP_API_KEY }}
    node-version: ${{ matrix.node-version }}

Using Outputs

- name: Deploy to Static.app
  id: deploy
  uses: designmodo/[email protected]
  with:
    api-key: ${{ secrets.STATIC_APP_API_KEY }}

- name: Comment PR with Deploy URL
  uses: actions/github-script@v6
  with:
    script: |
      github.rest.issues.createComment({
        issue_number: context.issue.number,
        owner: context.repo.owner,
        repo: context.repo.repo,
        body: '🚀 Deployed to: ${{ steps.deploy.outputs.site-url }}'
      })

Troubleshooting

Common Issues

❌ "API key is required"

  • Make sure you've added STATIC_APP_API_KEY to your repository secrets
  • Verify the secret name matches exactly

❌ "Build command failed"

  • Check your build command syntax
  • Ensure all dependencies are properly installed
  • Verify the build directory exists after the build

❌ "Invalid API key"

  • Regenerate your API key in Static.app dashboard
  • Update the GitHub secret with the new key

❌ "Site not found"

  • If using pid, make sure the project exists and you have access
  • Remove pid to create a new site instead

Debug Mode

Enable debug logging by adding this to your workflow:

env:
  ACTIONS_STEP_DEBUG: true

Support

License

MIT License - see LICENSE file for details.


Made with ❤️ by the Static.app team

Static.app Deploy is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Deploy your static site or built application to Static.app
v1.0.0
Latest

Static.app Deploy is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.