Skip to content

Deploy

Deploy #6

Workflow file for this run

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