-
Notifications
You must be signed in to change notification settings - Fork 3
38 lines (30 loc) · 937 Bytes
/
Copy pathdeploy.yml
File metadata and controls
38 lines (30 loc) · 937 Bytes
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
name: Deploy to Production
on:
push:
branches: [master]
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20' # or your version
- name: Install dependencies
run: npm ci
- name: Build project
run: npm run build
env:
VITE_PODCASTINDEX_API_KEY: ${{ secrets.VITE_PODCASTINDEX_API_KEY }}
VITE_PODCASTINDEX_API_SECRET: ${{ secrets.VITE_PODCASTINDEX_API_SECRET }}
- name: Copy files to production server
uses: appleboy/scp-action@v0.1.4
with:
host: ${{ secrets.PROD_HOST }}
username: ${{ secrets.PROD_USER }}
key: ${{ secrets.PROD_SSH_KEY }}
source: "dist/*"
target: ${{ secrets.PROD_PATH }}
strip_components: 1