-
Notifications
You must be signed in to change notification settings - Fork 1
49 lines (43 loc) · 1.24 KB
/
deploy.yml
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
# Based on https://github.com/actions/starter-workflows/blob/main/ci/node.js.yml
name: Deploy to web hosting
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: ✅ Checkout
uses: actions/checkout@v2
- name: 🏗 Setup
uses: actions/setup-node@v2
with:
node-version: lts/*
cache: 'npm'
- name: ⚙️ Install
run: npm ci
- name: 🛠 Build
run: npm run build:production
- name: 📂 Upload build (to artifacts)
uses: actions/upload-artifact@v3
with:
name: covid-stats-front
path: ./dist/
deploy:
runs-on: ubuntu-latest
needs: build
steps:
- name: 🖥 Download built WEB (to artifacts)
uses: actions/download-artifact@v3
with:
name: covid-stats-front
- name: 📂 Upload static files to the server
uses: sebastianpopp/ftp-action@releases/v2
with:
host: ${{ secrets.FTP_SERVER }}
user: ${{ secrets.FTP_USER }}
password: ${{ secrets.FTP_PASSWORD }}
localDir: ./covid/
remoteDir: ./
options: --exclude .htaccess --exclude robots.txt --delete --delete-first --ascii