forked from Samuel1-ona/hunty
-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (58 loc) · 1.85 KB
/
Copy pathdeploy-staging.yml
File metadata and controls
68 lines (58 loc) · 1.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Deploy to Staging
on:
push:
branches:
- develop
jobs:
deploy-staging:
name: Deploy to Staging Environment
runs-on: ubuntu-latest
environment:
name: staging
url: https://staging.hunty.app
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Build application
run: npm run build
- name: Create deployment status
uses: chrnorm/deployment-status@v2
if: always()
with:
token: '${{ secrets.GITHUB_TOKEN }}'
environment-url: https://staging.hunty.app
state: ${{ job.status }}
deployment-id: ${{ github.run_id }}
# Add your actual deployment steps here
# For example, if using Vercel:
# - name: Deploy to Vercel Staging
# uses: amondnet/vercel-action@v25
# with:
# vercel-token: ${{ secrets.VERCEL_TOKEN }}
# vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
# vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
# scope: ${{ secrets.VERCEL_ORG_ID }}
# alias: staging
# Or if using a custom deployment script:
- name: Deploy staging environment
run: |
echo "Deploying to staging environment..."
# Add your deployment command here
# Example: ./scripts/deploy-staging.sh
- name: Notify deployment complete
if: success()
run: |
echo "✅ Deployment to staging completed successfully"
echo "Environment URL: https://staging.hunty.app"
- name: Notify deployment failure
if: failure()
run: |
echo "❌ Deployment to staging failed"
exit 1