45 lines
1.1 KiB
YAML
45 lines
1.1 KiB
YAML
# .github/workflows/deploy.yml
|
|
name: Deploy openDAW studio
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build-and-deploy:
|
|
runs-on: ubuntu-latest
|
|
environment: production
|
|
|
|
steps:
|
|
- name: ⬇️ Checkout main repo
|
|
uses: actions/checkout@v5
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: 🦄 Set up Node.js
|
|
uses: actions/setup-node@v5
|
|
with:
|
|
node-version: 22
|
|
cache: npm
|
|
|
|
- name: 📦 Install dependencies
|
|
run: npm ci
|
|
|
|
- name: 🏗️ Build project
|
|
shell: bash
|
|
env:
|
|
CI: true
|
|
BRANCH_NAME: ${{ github.ref_name }}
|
|
run: |
|
|
npm run build
|
|
|
|
- name: 🚚 Run deploy script
|
|
env:
|
|
TERM: xterm-256color
|
|
SFTP_HOST: ${{ secrets.SFTP_HOST }}
|
|
SFTP_PORT: ${{ secrets.SFTP_PORT }}
|
|
SFTP_USERNAME: ${{ secrets.SFTP_USERNAME }}
|
|
SFTP_PASSWORD: ${{ secrets.SFTP_PASSWORD }}
|
|
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
|
|
BRANCH_NAME: ${{ github.ref_name }}
|
|
run: |
|
|
npx ts-node --transpile-only deploy/run.ts |