Add .gitea/workflows/deploy.yml
This commit is contained in:
commit
8a9bdc744a
49
.gitea/workflows/deploy.yml
Normal file
49
.gitea/workflows/deploy.yml
Normal file
@ -0,0 +1,49 @@
|
||||
on:
|
||||
workflow_call:
|
||||
secrets:
|
||||
ssh-private-key:
|
||||
required: true
|
||||
type: string
|
||||
env:
|
||||
required: true
|
||||
type: string
|
||||
inputs:
|
||||
image:
|
||||
required: false
|
||||
type: string
|
||||
default: git.qlic.nl/qlic/deploy:php8.3-node22
|
||||
username:
|
||||
required: false
|
||||
type: string
|
||||
default: ${{ vars.REGISTRY_USERNAME }}
|
||||
password:
|
||||
required: false
|
||||
type: string
|
||||
default: ${{ vars.REGISTRY_PASSWORD }}
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-24.04
|
||||
container:
|
||||
image: git.qlic.nl/qlic/deploy:php8.3-node22
|
||||
credentials:
|
||||
username: ${{ inputs.username }}
|
||||
password: ${{ input.password }}
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
- uses: webfactory/ssh-agent@dc588b651fe13675774614f8e6a936a468676387
|
||||
with:
|
||||
ssh-private-key: ${{ secrets.ssh-private-key }}
|
||||
- name: Setup composer
|
||||
uses: https://git.qlic.nl/actions/setup-composer@main
|
||||
with:
|
||||
args: --verbose --prefer-dist --no-progress --no-interaction --no-dev --optimize-autoloader --ignore-platform-reqs
|
||||
- name: Create .env file from secret
|
||||
run: echo "${{ secrets.env }}" > .env
|
||||
- name: Disable strict host key checking
|
||||
run: |
|
||||
echo "Host *" >> ~/.ssh/config
|
||||
echo " StrictHostKeyChecking no" >> ~/.ssh/config
|
||||
- name: Deploy
|
||||
run: vendor/bin/dep deploy environment=production
|
Loading…
x
Reference in New Issue
Block a user