# Introducing ic-deploy-actions – Automate ICP Deployments with Ease

**URL:** <https://forum.dfinity.org/t/introducing-ic-deploy-actions-automate-icp-deployments-with-ease/50982>\
**Category:** Developers\
**Created:** [June 19, 2025, 7:14am UTC](https://forum.dfinity.org/t/introducing-ic-deploy-actions-automate-icp-deployments-with-ease/50982 "2025-06-19T07:14:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stephen-Kimoi](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/stephen-kimoi/32/28729_2.png) [@Stephen-Kimoi](https://forum.dfinity.org/u/Stephen-Kimoi)\
**Post date:** [June 19, 2025, 7:14am UTC](https://forum.dfinity.org/t/introducing-ic-deploy-actions-automate-icp-deployments-with-ease/50982/1 "2025-06-19T07:14:53Z")

</div>

Hi everyone,

I’ve been working on a tool to make ICP deployments smoother and faster, especially in CI/CD pipelines. Today I’m excited to share **`ic-deploy-actions` v0.1.0** , a GitHub Action that lets you **automate the deployment** of your **backend canisters** and **frontend assets** in just a few lines.

🔗 **GitHub Repo** : [github.com/Stephen-Kimoi/ic-deploy-action](https://github.com/Stephen-Kimoi/ic-deploy-action)

* * *

### Features

- 🔐 Secure authentication using PEM keys
- 🌐 Deploy to local, testnet, or mainnet
- 🚀 Deploy specific canisters or all at once
- 🎨 Optional frontend asset deployment
- ⚡ Fast and reliable CI/CD integration
- 🔄 Upgrade mode for existing canisters
- 📦 Automatic WASM file detection and upload

* * *

### 🛠 Quick Usage

#### 1. Install via GitHub Actions

Create a `.github/workflows/deploy.yml`:

```yml
name: Deploy to IC

on:
  push:
    branches: [main]
  workflow_dispatch:

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - name: Deploy to IC
        uses: Stephen-Kimoi/ic-deploy-action/action@v0.1.0
        with:
          pem_key: ${{ secrets.IC_PEM_KEY }}
          network: 'ic'
          canister_name: 'your_backend_canister_name'
          deploy_frontend: 'true'
          frontend_dir: 'src/your_frontend_dir/dist'
          backend_package: 'your_backend_package'
          frontend_package: 'your_frontend_package'
          frontend_src_dir: 'src/your_frontend_dir'

```

#### 2. Generate a PEM key and add to GitHub Secrets

```bash
dfx identity new test-identity --storage-mode=plaintext
dfx identity export test-identity > test-identity.pem
base64 -i test-identity.pem > test-identity.pem.base64

```

Add the base64 content to your repo secrets as `IC_PEM_KEY`.

* * *

### 📁 Recommended Project Structure

```pgsql
your-project/
├── src/
│ └── backend/ # Backend Rust canister source
│ └── frontend/ # Frontend source (if any)
│ └── dist/ # Built frontend assets
├── dfx.json # DFINITY project configuration
├── canister_ids.json # Canister IDs (generated after deployment)
├── Cargo.toml # Rust package manifest (for backend)
├── package.json # Node.js manifest (for frontend, if any)
├── tsconfig.json # TypeScript config (if any)
├── node_modules/ # Node.js dependencies (if any)
└── ... 

```

* * *

##### Example: Backend Only Deployment

```auto
- name: Deploy to IC
  uses: Stephen-Kimoi/ic-deploy-action/action@v0.1.0
  with:
    pem_key: ${{ secrets.IC_PEM_KEY }}
    network: 'ic'
    canister_name: 'your_backend_canister_name'
    deploy_frontend: 'false'
    backend_package: 'your_backend_package'

```

##### Example: Frontend Only Deployment

```yaml
- name: Deploy to IC
  uses: Stephen-Kimoi/ic-deploy-action/action@v0.1.0
  with:
    pem_key: ${{ secrets.IC_PEM_KEY }}
    network: 'ic'
    deploy_frontend: 'true'
    frontend_dir: 'src/your_frontend_dir/dist'
    backend_package: 'your_frontend_package'
    frontend_package: 'your_frontend_package'
    frontend_src_dir: 'src/your_frontend_dir'

```

* * *

### 🔒 Security Notes

- Your PEM key is only used during deployment and should always be stored as a GitHub secret.
- The action does **not** create canisters — it only upgrades existing ones.

* * *

### 🤝 Contributing

PRs and suggestions are welcome, especially if you’re using different project structures or CI workflows.

* * *

Let me know what you think! Hope this saves you time deploying to the IC 🙌

* * *

Full documentation and repo can be found [here](https://github.com/Stephen-Kimoi/ic-deploy-action)
