1
0
Fork 0
forked from CRSS/Website
Website/.gitea/workflows/upload.yml

37 lines
1 KiB
YAML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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