Skip to main content

CI/CD Integration

Automate your Worktree Cloud Site deployments with continuous integration and deployment pipelines, integrated right into Worktree Actions.

Worktree Actions

---
name: Deploy
"on":
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

# Build your site. For example, Hugo:
- name: Setup Hugo
uses: https://github.com/peaceiris/actions-hugo@v3
with:
hugo-version: '0.140.0'
- name: Build
run: hugo --minify

# In the Worktree Cloud Console, get your site's ID, generate Credentials
# with access to your Site, then you're ready to deploy!
- name: Deploy to Worktree Cloud Sites
uses: worktree/deploy-site@v2
with:
source: ./public
site_id: xxxyyyyzzzz
public_key: ${{ secrets.WT_CLOUD_PUBLIC_KEY }}
secret_key: ${{ secrets.WT_CLOUD_SECRET_KEY }}

Next Steps