Skip to content

Deploy Apps

Deploy Apps #29

Workflow file for this run

name: Deploy Apps
on:
workflow_dispatch:
inputs:
next:
description: Is it a dev / next release ?
required: true
type: boolean
deploy:
description: Deploy to public website?
required: true
type: boolean
branch:
description: Deploy from which branch ?
required: true
type: string
default: 'main'
jobs:
build:
env:
branch: ${{ inputs.branch }}
stage: ${{ inputs.next == true && 'next' || 'latest' }}
build: ${{ inputs.next == true && 'next' || 'production' }}
ELECTRON_EXTRA_LAUNCH_ARGS: '--disable-gpu'
runs-on: ubuntu-latest
strategy:
matrix:
browser: [chromium]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
ref: ${{ env.branch }}
token: ${{secrets.DONTCODE_ACTIONS_TOKEN}}
- name: Git config user
uses: snow-actions/git-config-user@v1.0.0
with:
name: Dont-code
email: developer@dont-code.net
- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: 'https://registry.npmjs.org'
- name: Install
run: |
node common/scripts/install-run-rush.js install
- name: Build
run: |
node common/scripts/install-run-rush.js build-deploy-${{ env.stage }}
- name: Deploy to test.dont-code.net apps with ${{env.stage}}
if: ${{ success() && (matrix.browser == 'chromium') && ( inputs.deploy == true ) }}
uses: wlixcc/SFTP-Deploy-Action@v1.2.5
with:
username: ${{secrets.DONTCODE_APPS_WEBSITE_USER}}
password: ${{secrets.DONTCODE_APPS_WEBSITE_PASSWORD}}
local_path: './dist/${{env.stage}}/*'
remote_path: '/www/${{env.stage}}'
server: 'test.dont-code.net'
sftp_only: 'true'
delete_remote_files: 'false'