Deploy with Workflows

Edit this page

Leanr how to automate EAS Hosting deployments with Workflows.


EAS Workflows is a great way to automate the web deployment of your project to EAS Hosting with pull request (PR) previews and production deployments.

Setup workflows

To use EAS workflows to automatically deploy your project, follow the instructions in Get started with EAS workflows and add the GitHub integration for your project.

Create a deployment workflow

Add the following file to .eas/workflows/deploy.yml. This will use the production environment variables, export the web bundle, deploy your project and promote it to production whenever you push to the main branch.

name: Deploy

on:
  push:
    branches: ['main']

jobs:
  deploy:
    type: deploy
    name: Deploy
    environment: production
    params:
      prod: true

Now, whenever a commit is pushed to main or a PR is merged, the workflow will run to deploy your website.

You can also test this workflow by triggering it manually:

Terminal
eas workflow:run .eas/workflows/deploy.yml