forked from CRSS/Website
37 lines
1 KiB
YAML
37 lines
1 KiB
YAML
name: ️Upload Website
|
||
|
||
on: [ push ]
|
||
|
||
jobs:
|
||
sftp:
|
||
runs-on: ubuntu-latest
|
||
steps:
|
||
- name: Checkout the repository
|
||
uses: actions/checkout@v2
|
||
|
||
- name: Upload files via SFTP
|
||
uses: https://github.com/wangyucode/sftp-upload-action@v2.0.2
|
||
with:
|
||
host: ${{ secrets.HOST }}
|
||
username: ${{ secrets.USER }}
|
||
password: ${{ secrets.PASSWORD }}
|
||
compress: true
|
||
forceUpload: true
|
||
localDir: '.'
|
||
remoteDir: '/var/www/crss'
|
||
exclude: '.git*,.env.*,LICENSE,README.md'
|
||
ssh:
|
||
runs-on: ubuntu-latest
|
||
timeout-minutes: 5
|
||
steps:
|
||
- name: Install dependencies on the server
|
||
uses: https://github.com/appleboy/ssh-action@v0.1.10
|
||
with:
|
||
host: ${{ secrets.HOST }}
|
||
username: ${{ secrets.USERNAME }}
|
||
password: ${{ secrets.PASSWORD }}
|
||
port: ${{ secrets.PORT }}
|
||
command_timeout: 30m
|
||
script: |
|
||
cd /var/www/crss
|
||
composer install |