-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (36 loc) · 1015 Bytes
/
build-and-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
name: Build and Deploy
on:
push:
branches:
- main
jobs:
build:
runs-on: ${{ fromJSON('["ubuntu-latest", "self-hosted"]')[github.repository == 'github/docs-internal'] }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install dependencies
run: npm install
- name: Build
run: npm run build
- uses: actions/upload-artifact@v3
with:
name: app-build
path: dist
deploy:
runs-on: ${{ fromJSON('["ubuntu-latest", "self-hosted"]')[github.repository == 'github/docs-internal'] }}
needs: build
steps:
- name: Download build artifacts
uses: actions/download-artifact@v3
with:
name: app-build
- run: ls -R
- name: Deploy to FTP
uses: SamKirkland/FTP-Deploy-Action@v4.3.4
with:
server: ${{ secrets.FTP_SERVER }}
username: ${{ secrets.FTP_USERNAME }}
password: ${{ secrets.FTP_PASSWORD }}
local-dir: ./
server-dir: /wwwroot/