# Drupal Update Deploy

> Use when user wants to update Drupal dependencies and deploy the changes to an Acquia environment, optionally triggering a pipeline build. Chains drupal-maintenance, acli, and pipelines-cli skills.

- **Type:** Skill
- **Install:** `agentstack add skill-acquia-acquia-skills-private-drupal-update-deploy`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [acquia](https://agentstack.voostack.com/s/acquia)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [acquia](https://github.com/acquia)
- **Source:** https://github.com/acquia/acquia-skills-private/tree/main/skills/playbooks/drupal-update-deploy

## Install

```sh
agentstack add skill-acquia-acquia-skills-private-drupal-update-deploy
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Drupal Update and Deploy Workflow

Use when:
- Applying Drupal dependency updates and deploying to an Acquia environment
- Running the full cycle: update packages → push code → deploy → trigger pipeline

> **Prerequisites:** The following skill sets must be loaded: `drupal-maintenance`, `acli`, `pipelines-cli`.

---

## Workflow

### Step 1 — Apply dependency updates

Ask the user: **"Do you need to apply dependency updates first, or are updates already done?"**

- If updates are needed → follow **[Security Updates](../../drupal-maintenance/security-updates/SKILL.md)** or **[Dependency Updates](../../drupal-maintenance/dependency-updates/SKILL.md)** depending on the use case, then return here.
- If updates are already applied → proceed to Step 2.

---

### Step 2 — Fetch application and environments

Always run these before asking the user where to deploy. This ensures the correct application and environment IDs are used.

```bash
# List available applications and note the UUID
acli api:applications:list
```

Output shows application names and UUIDs. Ask the user: **"Which application do you want to deploy to?"** and confirm the UUID.

```bash
# List environments for the selected application
acli api:environments:list 
```

Output shows environment labels (dev, stage, prod, CDEs), IDs, and the currently deployed branch. Ask the user: **"Which environment do you want to deploy to?"**

---

### Step 3 — Commit code changes

Before pushing, check for uncommitted changes:

```bash
git status
```

If there are uncommitted changes, ask the user: **"Do you want to commit these changes before deploying?"**

- If yes — ask for a commit message, then commit:
  ```bash
  git add -A
  git commit -m ""
  ```
- If no — warn the user that uncommitted changes will not be included in the deployment and confirm they want to proceed.

---

### Step 4 — Push code to Acquia Cloud

Push the committed code to the selected environment:

```bash
acli push:code
```

Follow **[Pull & Push](../../acli/pull-push/SKILL.md)** for full options (selecting environments, handling conflicts).

---

### Step 5 — Switch code on the environment

After pushing, switch the environment to the updated branch using the environment ID from Step 2:

```bash
acli api:environments:switchCode  --branch=
```

Follow **[Environment Management](../../acli/environment-management/SKILL.md)** for deploy options.

---

### Step 6 — Trigger a pipeline build (optional)

Ask the user: **"Do you want to trigger a pipeline build for the deployed branch?"**

- If yes → follow **[Pipeline Operations](../../pipelines-cli/pipeline-operations/SKILL.md)** to start the build and stream logs:

```bash
pipelines start --application-id= --vcs-path= --tail
```

- If no → workflow complete.

---

### Step 7 — Verify deployment

After the pipeline completes (or if skipping pipelines), confirm the environment is running the expected code:

```bash
acli api:environments:list 
```

Check the `vcs` field of the target environment to confirm the branch matches.

---

## Quick Reference

| Step | Tool | Skill |
|------|------|-------|
| Update packages | composer | `drupal-maintenance-security-updates` or `drupal-maintenance-dependency-updates` |
| Fetch application + environments | acli | `acli-application-management`, `acli-environment-management` |
| Commit code changes | git | — |
| Push code | acli | `acli-pull-push` |
| Deploy to environment | acli | `acli-environment-management` |
| Trigger pipeline | pipelines-cli | `pipelines-cli-pipeline-operations` |

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [acquia](https://github.com/acquia)
- **Source:** [acquia/acquia-skills-private](https://github.com/acquia/acquia-skills-private)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-acquia-acquia-skills-private-drupal-update-deploy
- Seller: https://agentstack.voostack.com/s/acquia
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
