Skip to content

Commit b26519d

Browse files
authored
Update GitHub Actions checkout action version from deprecated version (#360)
* Update GitHub Actions checkout action version * Add GitHub Actions workflow examples for Zerops Added examples of GitHub Actions workflows for deploying to Zerops, including a basic deployment and a tag-matching deployment. * Update github-integration.mdx
1 parent e14d4a7 commit b26519d

1 file changed

Lines changed: 28 additions & 1 deletion

File tree

apps/docs/content/references/github-integration.mdx

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,8 @@ As an alternative to direct integration, you can use GitHub Actions to manage yo
106106
1. **Create Workflow Configuration**
107107

108108
Create a new file at `.github/workflows/deploy.yaml` in your repository:
109+
110+
Basic example:
109111

110112
```yaml
111113
name: Deploy to Zerops
@@ -121,7 +123,7 @@ As an alternative to direct integration, you can use GitHub Actions to manage yo
121123

122124
steps:
123125
- name: Checkout code
124-
uses: actions/checkout@v3
126+
uses: actions/checkout@v7
125127

126128
- name: Deploy with Zerops
127129
uses: zeropsio/actions@main
@@ -130,6 +132,31 @@ As an alternative to direct integration, you can use GitHub Actions to manage yo
130132
service-id: your-service-id
131133
```
132134
135+
Example with tag matching:
136+
137+
```yaml
138+
name: Deploy to Zerops on Tag
139+
140+
on:
141+
push:
142+
tags:
143+
- 'v[0-9]+\.[0-9]+\.[0-9]+' # Example: v1.0.0, v2.3.4
144+
145+
jobs:
146+
deploy:
147+
runs-on: ubuntu-latest
148+
149+
steps:
150+
- name: Checkout code
151+
uses: actions/checkout@v7
152+
153+
- name: Deploy with Zerops
154+
uses: zeropsio/actions@main
155+
with:
156+
access-token: ${{ secrets.ZEROPS_TOKEN }}
157+
service-id: your-service-id
158+
```
159+
133160
2. **Generate Access Token**
134161
135162
- Navigate to [**Settings > Access Token Management**](https://app.zerops.io/settings/token-management) in your Zerops dashboard

0 commit comments

Comments
 (0)