-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (35 loc) · 1.1 KB
/
main.yml
File metadata and controls
45 lines (35 loc) · 1.1 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
name: CI/CD
on: push
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Get latest submodule from remote repo
run: git submodule update --init --recursive
- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: npm install
- name: Build
run: CI= npm run build
- name: get correct branch
run: |
branch=$(echo ${{ github.ref }} | sed 's/refs\/heads\///')
echo "branch=${branch}" >> $GITHUB_ENV
- name: Hello branch
run: echo Nazdarek branchi ${{ env.branch }}
- name: 📂 Sync files
uses: SamKirkland/FTP-Deploy-Action@4.1.0
with:
server: 270239.w39.wedos.net
username: w270239_lukas
password: ${{ secrets.password }}
local-dir: ./public/
server-dir: /subdom/app/${{ env.branch }}/