From 14a192f9f35a0102793ecf03a4619517717db102 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Wed, 25 Oct 2023 15:04:58 +0200 Subject: [PATCH] Build editors --- .github/workflows/editors.yml | 44 +++++++++++++++++++++++++++++++++++ editors/markdown/package.json | 1 + editors/richtext/package.json | 1 + 3 files changed, 46 insertions(+) create mode 100644 .github/workflows/editors.yml diff --git a/.github/workflows/editors.yml b/.github/workflows/editors.yml new file mode 100644 index 00000000..de2baac0 --- /dev/null +++ b/.github/workflows/editors.yml @@ -0,0 +1,44 @@ +name: Build Dotnet SDK + +on: + push: + branches: [ master ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4.1.1 + + - name: Setup Node.js environment + uses: actions/setup-node@v3.8.1 + + - name: Move Files + run: | + md out + mv editors/*.* out/ + + - name: Build Markdown + run: | + cd editors/markdown + npm i + npm run build-editor + mv dist/index.html dist/old-markdown.html + mv dist/* ../../out/ + + - name: Build Rich Text + run: | + cd editors/richtext + npm i + npm run build-editor + mv dist/index.html dist/old-richtext.html + mv dist/* ../../out/ + + - name: Deploy + uses: JamesIves/github-pages-deploy-action@v4.4.3 + with: + branch: gh-pages + folder: dist + clean: true diff --git a/editors/markdown/package.json b/editors/markdown/package.json index 4b7401e1..977b7c5a 100644 --- a/editors/markdown/package.json +++ b/editors/markdown/package.json @@ -6,6 +6,7 @@ "scripts": { "dev": "vite", "build": "tsc && vite build", + "build-editors": "tsc && vite build --base=/editors/", "preview": "vite preview", "server-local": "docker run -p 3100:3100 -v dist/index.html:/usr/share/caddy/index.html caddy caddy --root /var/www/html --listen :3100 --browse" }, diff --git a/editors/richtext/package.json b/editors/richtext/package.json index a377c1c8..89c6054b 100644 --- a/editors/richtext/package.json +++ b/editors/richtext/package.json @@ -6,6 +6,7 @@ "scripts": { "dev": "vite", "build": "tsc && vite build", + "build-editor": "tsc && vite build --base=/editors/", "preview": "vite preview" }, "devDependencies": {