Add deploy script.
Some checks failed
Build and Deploy / build_and_deploy (push) Failing after 1m15s
Some checks failed
Build and Deploy / build_and_deploy (push) Failing after 1m15s
This commit is contained in:
parent
1eaaad5852
commit
178eb5e83f
34
.gitea/workflows/deploy.yml
Normal file
34
.gitea/workflows/deploy.yml
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
name: Build and Deploy
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build_and_deploy:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Install prerequisites
|
||||||
|
run: apt update -y && apt install -y make php git curl
|
||||||
|
- name: Checkout Repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
- name: Compile Web Pages
|
||||||
|
run: |
|
||||||
|
composer install
|
||||||
|
mkdir -p ./out
|
||||||
|
cp -r ./www ./out
|
||||||
|
cp -r ./vendor ./out
|
||||||
|
- name: SFTP Deploy
|
||||||
|
uses: wlixcc/SFTP-Deploy-Action@v1.2.5
|
||||||
|
with:
|
||||||
|
username: '${{ vars.SSH_USER }}'
|
||||||
|
server: '${{ vars.SSH_SERVER }}'
|
||||||
|
port: '${{ vars.SSH_PORT }}'
|
||||||
|
ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||||
|
local_path: './out/*'
|
||||||
|
remote_path: '${{ vars.DESTINATION }}'
|
||||||
|
sftpArgs: -o ConnectTimeout=10
|
||||||
|
rsyncArgs: --exclude=.*
|
Loading…
x
Reference in New Issue
Block a user