-
Notifications
You must be signed in to change notification settings - Fork 1
52 lines (43 loc) · 1.19 KB
/
deploy.yml
File metadata and controls
52 lines (43 loc) · 1.19 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
name: Build and Deploy to Needle Cloud
on:
push:
branches: ["main"]
workflow_dispatch:
# Allow one concurrent deployment
concurrency:
group: "deploy"
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 10
defaults:
run:
working-directory: Website
steps:
- name: Checkout
uses: actions/checkout@v4
with:
lfs: true
- uses: actions/setup-node@v4
with:
node-version: '20.x'
cache: 'npm'
cache-dependency-path: 'Website/package-lock.json'
- run: npm ci
- name: Build
run: npm run build
env:
NEEDLE_CLOUD_TOKEN: ${{ secrets.NEEDLE_CLOUD_TOKEN }}
# Deploy to Needle Cloud
- name: Deploy to Needle Cloud
uses: needle-tools/deploy-to-needle-cloud-action@v1
id: deploy
with:
token: ${{ secrets.NEEDLE_CLOUD_TOKEN }}
dir: Website/build
webhookUrl: ${{ secrets.WEBHOOK_URL }}
# Display the deployment URL
- name: Display deployment URL
run: |
echo "::notice title=Deployment URL::Deployed to ${{ steps.deploy.outputs.url }}"