feat: add upload action

This commit is contained in:
TheClashFruit 2023-09-15 15:46:35 +02:00
parent 061a8546fe
commit 12279774e8
Signed by: TheClashFruit
GPG key ID: CF4A319B9A73290C
2 changed files with 38 additions and 1 deletions

View 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

View file

@ -8,6 +8,6 @@
<title>Clyde's Real Survival SMP &bull; {{ 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>