mirror of
https://gitlab.com/ifiction/ifhub-telegram.git
synced 2024-10-22 22:15:31 +00:00
autodeploy (gitea)
This commit is contained in:
parent
bed23e9520
commit
065d07675e
1 changed files with 33 additions and 0 deletions
33
.forgejo/workflows/deploy.yaml
Normal file
33
.forgejo/workflows/deploy.yaml
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
runs-on: docker
|
||||||
|
container:
|
||||||
|
image: "oreolek/php8node:latest"
|
||||||
|
env:
|
||||||
|
phpver: "8.3"
|
||||||
|
path: ${{ github.ref == 'refs/heads/main' && secrets.DEPLOY_PATH_MAIN }}
|
||||||
|
steps:
|
||||||
|
- name: Set up git permissions
|
||||||
|
run: |
|
||||||
|
git config --global --add safe.directory "$GITHUB_WORKSPACE"
|
||||||
|
- name: Get latest code
|
||||||
|
uses: "https://code.forgejo.org/actions/checkout@v4"
|
||||||
|
- name: Install Composer dependencies
|
||||||
|
uses: "https://github.com/ramsey/composer-install@v3"
|
||||||
|
with:
|
||||||
|
composer-options: "--no-dev --optimize-autoloader"
|
||||||
|
- name: Sync files
|
||||||
|
uses: "https://github.com/burnett01/rsync-deployments@7.0.1"
|
||||||
|
with:
|
||||||
|
switches: "-avzr --exclude='/.git' --exclude={'/.editorconfig','/.forgejo','/tests'}"
|
||||||
|
remote_path: ${{ env.path }}
|
||||||
|
remote_host: ${{ secrets.DEPLOY_HOST }}
|
||||||
|
remote_user: ${{ secrets.DEPLOY_USER }}
|
||||||
|
remote_key: ${{ secrets.DEPLOY_KEY }}
|
Loading…
Reference in a new issue