31 lines
893 B
YAML
31 lines
893 B
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 }}
|
||
forceUpload: false
|
||
localDir: '.'
|
||
remoteDir: '/var/www/crss'
|
||
exclude: '.*,.git*,.gitea*,LICENSE,README.md'
|
||
|
||
- name: Install dependencies over SSH
|
||
uses: https://github.com/nekiro/ssh-job@main
|
||
with:
|
||
host: ${{ secrets.HOST }}
|
||
user: ${{ secrets.USER }}
|
||
password: ${{ secrets.PASSWORD }}
|
||
command: |
|
||
cd /var/www/crss
|
||
composer install --no-dev --optimize-autoloader |