forked from mollie/PrestaShop
-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (49 loc) · 1.82 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
50
51
52
name: Deploy
on:
pull_request:
types: [closed]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: build
# IF YOU EDIT THIS, DON'T FORGET TO EDIT release.yml
run: |
composer install --no-dev --optimize-autoloader --classmap-authoritative
composer dump-autoload --no-dev --optimize --classmap-authoritative
npm install --quiet --no-progress
rm -rf node_modules
rm -rf .git
rm -rf .github
rm -rf tests
rm -rf cypress
rm -rf .docker
rm -rf vendor/segmentio/analytics-php/.buildscript
rm -rf vendor/segmentio/analytics-php/.circleci
rm -rf vendor/segmentio/analytics-php/.github
vendor/bin/autoindex
mkdir mollie
rsync -Rr ./ ./mollie
shopt -s extglob
rm -r !(mollie)
find . -maxdepth 1 -type f -exec rm "{}" \;
cd mollie && rm -rf mollie
- name: Archive production artifacts
uses: actions/upload-artifact@v2
with:
name: mollie
path: |
.
demo:
name: Demo deployment
runs-on: ubuntu-latest
steps:
- name: executing remote ssh commands using password
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }}
script: cd ${{ secrets.PATH }} && sh deploy.sh