-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (66 loc) · 2.11 KB
/
main.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: Build, Test and Deploy with FTP
on: push
jobs:
build:
name: Build
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
with:
version: 8.15.5
- uses: actions/setup-node@master
with:
node-version: 20.x
- name: pnpm module install
run: pnpm install --frozen-lockfile
- name: nuxt generate
run: pnpm run generate
- uses: actions/upload-artifact@master
with:
name: build-artifact
path: .output/public/
test-cypress:
name: Cypress Tests
runs-on: ubuntu-20.04
needs:
- build
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
with:
version: 8.15.5
- uses: actions/setup-node@master
with:
node-version: 20.x
- uses: actions/download-artifact@master
with:
name: build-artifact
path: .output/public/
- name: Cypress run
uses: cypress-io/github-action@v6
with:
start: npx serve .output/public
browser: chrome
# Deploy if this is the master branch
deploy:
needs:
- build
- test-cypress
runs-on: ubuntu-20.04
if: github.ref == 'refs/heads/master'
name: Deploy to FTP Server
steps:
- uses: actions/download-artifact@master
with:
name: build-artifact
path: .output/public/
- name: Deploy to FTP Server
uses: SamKirkland/[email protected]
with:
server: ha01s018.org-dns.com
username: bassadin_root_website
password: ${{ secrets.FTP_Password }}
protocol: ftps
local-dir: .output/public/
security: strict