forked from CRSS/Website
feat: add upload action
This commit is contained in:
parent
061a8546fe
commit
12279774e8
37
.gitea/workflows/upload.yml
Normal file
37
.gitea/workflows/upload.yml
Normal file
|
@ -0,0 +1,37 @@
|
|||
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
|
|
@ -8,6 +8,6 @@
|
|||
<title>Clyde's Real Survival SMP • {{ pageTitle }}</title>
|
||||
|
||||
<link rel="icon" href="favicon.ico">
|
||||
<link rel="stylesheet" href="css/style.css">
|
||||
<link rel="stylesheet" href="css/style.min.css">
|
||||
</head>
|
||||
<body>
|
Loading…
Reference in a new issue