Merge pull request #909 from jwetzell/dependabot/npm_and_yarn/webui/t… #182
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish webui to demo site | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
paths: | |
- 'webui/**' | |
- 'schema/**' | |
- 'sample/config/default.json' | |
jobs: | |
build-webui: | |
runs-on: ubuntu-latest | |
steps: | |
- name: check out repository | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: set up Node.js | |
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0 | |
with: | |
node-version-file: '.nvmrc' | |
cache: 'npm' | |
cache-dependency-path: 'webui/package-lock.json' | |
- name: install Node.js dependencies | |
run: npm ci | |
working-directory: ./webui | |
- name: build demo site | |
run: npm run build:demo | |
working-directory: ./webui | |
- name: copy default config | |
run: cp sample/config/default.json ./webui/dist/webui/browser/config.json | |
- name: copy schema | |
run: cp schema/config.schema.json ./webui/dist/webui/browser/config.schema.json | |
- name: Publish demo webui | |
uses: SamKirkland/FTP-Deploy-Action@8e83cea8672e3fbcbb9fdafff34debf6ae4c5f65 # v4.3.5 | |
with: | |
server: ${{secrets.FTP_URL}} | |
username: ${{secrets.DEMO_FTP_USERNAME}} | |
password: ${{secrets.DEMO_FTP_PASSWORD}} | |
local-dir: ./webui/dist/webui/browser/ | |
server-dir: / | |
port: 21 | |
protocol: ftps |