-
Notifications
You must be signed in to change notification settings - Fork 41
70 lines (66 loc) · 1.98 KB
/
Copy pathqadeploy.yml
File metadata and controls
70 lines (66 loc) · 1.98 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
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
on:
# Trigger the workflow on pull request.
pull_request:
types: [ opened, labeled, synchronize ]
name: 🚀 Deploy website on push
jobs:
web-deploy:
if: contains(github.event.pull_request.labels.*.name, 'deploy')
name: 🎉 Deploy
runs-on: ubuntu-latest
steps:
- name: 🚚 Get latest code
uses: actions/checkout@v3.5.0
- name: 🔄 Sanitize branch name
id: sanitize
run: |
BRANCH="${{ github.event.pull_request.head.ref }}"
SANITIZED_BRANCH="${BRANCH//\//-}"
echo "sanitized_branch=$SANITIZED_BRANCH" >> $GITHUB_OUTPUT
- name: 📂 Sync files
uses: SamKirkland/FTP-Deploy-Action@4.3.1
with:
server: ${{ secrets.FRM_FTP_HOST }}
server-dir: ${{ github.event.repository.name }}-${{ steps.sanitize.outputs.sanitized_branch }}/
username: ${{ secrets.FRM_FTP_USERNAME }}
password: ${{ secrets.FRM_FTP_PASSWORD }}
exclude: |
**/.*
**/.*/**
**/.git*/**
**/bin/**
**/node_modules/**
**/scss/**
**/tests/**
composer.json
package.json
package-lock.json
phpcs.xml
phpunit.xml
beta-deploy:
if: contains(github.event.pull_request.labels.*.name, 'beta deploy')
name: 🎉 Beta Deploy
runs-on: ubuntu-latest
steps:
- name: 🚚 Get latest code
uses: actions/checkout@v3.5.0
- name: 📂 Sync files
uses: SamKirkland/FTP-Deploy-Action@4.3.1
with:
server: ${{ secrets.FRM_FTP_HOST }}
server-dir: ${{ github.event.repository.name }}-beta/
username: ${{ secrets.FRM_FTP_USERNAME }}
password: ${{ secrets.FRM_FTP_PASSWORD }}
exclude: |
**/.*
**/.*/**
**/.git*/**
**/bin/**
**/node_modules/**
**/scss/**
**/tests/**
composer.json
package.json
package-lock.json
phpcs.xml
phpunit.xml