ci: migrate deployment to gitea actions
Deploy FileDrop / deploy (push) Successful in 3m21s
Deploy FileDrop / deploy (push) Successful in 3m21s
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
name: Deploy FileDrop
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Check out repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Bun
|
||||
uses: oven-sh/setup-bun@v2
|
||||
with:
|
||||
bun-version: latest
|
||||
|
||||
- name: Install dependencies
|
||||
run: bun install --frozen-lockfile
|
||||
|
||||
- name: Lint
|
||||
run: bun run lint
|
||||
|
||||
- name: Build
|
||||
run: bun run build
|
||||
|
||||
- name: Deploy to VPS
|
||||
shell: bash
|
||||
env:
|
||||
VPS_HOST: ${{ secrets.VPS_HOST }}
|
||||
VPS_USER: ${{ secrets.VPS_USER }}
|
||||
VPS_SSH_KEY_VALUE: ${{ secrets.VPS_SSH_KEY }}
|
||||
PRODUCTION_ENV: ${{ secrets.PRODUCTION_ENV }}
|
||||
ADMIN_PASSWORD: ${{ secrets.ADMIN_PASSWORD }}
|
||||
run: |
|
||||
set -eu
|
||||
|
||||
key_file="${RUNNER_TEMP:-/tmp}/filedrop_deploy_key"
|
||||
printf '%s\n' "$VPS_SSH_KEY_VALUE" > "$key_file"
|
||||
chmod 600 "$key_file"
|
||||
|
||||
printf '%s\n' "$PRODUCTION_ENV" > .env
|
||||
chmod 600 .env
|
||||
|
||||
VPS_SSH_KEY="$key_file" ./deploy.sh --no-build
|
||||
Reference in New Issue
Block a user