mirror of
https://github.com/ivabus/gui
synced 2025-06-07 07:40:27 +03:00
#11 initialize web preview
This commit is contained in:
parent
e183e358d8
commit
e7a6502c61
3 changed files with 26 additions and 15 deletions
26
.github/workflows/ci.yml
vendored
26
.github/workflows/ci.yml
vendored
|
@ -8,6 +8,7 @@ jobs:
|
||||||
outputs:
|
outputs:
|
||||||
svelte: ${{steps.svelte.outputs.src}}
|
svelte: ${{steps.svelte.outputs.src}}
|
||||||
tauri: ${{steps.tauri.outputs.src}}
|
tauri: ${{steps.tauri.outputs.src}}
|
||||||
|
preview_folder: ${{steps.preview.outputs.folder}}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: dorny/paths-filter@v2
|
- uses: dorny/paths-filter@v2
|
||||||
|
@ -23,6 +24,11 @@ jobs:
|
||||||
filters: |
|
filters: |
|
||||||
src:
|
src:
|
||||||
- 'packages/gui/src-tauri/**'
|
- 'packages/gui/src-tauri/**'
|
||||||
|
- name: get s3 preview folder
|
||||||
|
id: preview
|
||||||
|
run: |
|
||||||
|
preview=$(echo $GITHUB_REF_NAME | sed -e 's/\//-/g')
|
||||||
|
echo "folder=$preview" >> $GITHUB_OUTPUT
|
||||||
build_svelte:
|
build_svelte:
|
||||||
needs: changes
|
needs: changes
|
||||||
if: needs.changes.outputs.svelte == 'true'
|
if: needs.changes.outputs.svelte == 'true'
|
||||||
|
@ -51,6 +57,12 @@ jobs:
|
||||||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||||
aws-region: us-east-1
|
aws-region: us-east-1
|
||||||
|
- name: sync web files into preview folder
|
||||||
|
env:
|
||||||
|
prefix: ${{ needs.changes.outputs.preview_folder }}
|
||||||
|
run: |
|
||||||
|
aws s3 sync ./packages/gui/build \
|
||||||
|
"s3://preview.gui.tea.xyz/$prefix"
|
||||||
build_tauri:
|
build_tauri:
|
||||||
needs: changes
|
needs: changes
|
||||||
if: needs.changes.outputs.tauri == 'true'
|
if: needs.changes.outputs.tauri == 'true'
|
||||||
|
@ -109,16 +121,10 @@ jobs:
|
||||||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||||
aws-region: us-east-1
|
aws-region: us-east-1
|
||||||
|
|
||||||
- name: get s3 folder
|
|
||||||
id: prefix
|
|
||||||
run: |
|
|
||||||
prefix=$(echo $GITHUB_REF_NAME | sed -e 's/\//-/g')
|
|
||||||
echo "prefix=$prefix" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- name: mac-os cp package images from prod to preview bucket
|
- name: mac-os cp package images from prod to preview bucket
|
||||||
if: matrix.platform == 'macos-latest'
|
if: matrix.platform == 'macos-latest'
|
||||||
env:
|
env:
|
||||||
prefix: ${{ steps.prefix.outputs.prefix }}
|
prefix: ${{ needs.changes.outputs.preview_folder }}
|
||||||
run: |
|
run: |
|
||||||
aws s3 cp ./packages/gui/src-tauri/target/release/bundle/dmg/gui_0.1.0_x64.dmg \
|
aws s3 cp ./packages/gui/src-tauri/target/release/bundle/dmg/gui_0.1.0_x64.dmg \
|
||||||
"s3://preview.gui.tea.xyz/$prefix/gui.dmg"
|
"s3://preview.gui.tea.xyz/$prefix/gui.dmg"
|
||||||
|
@ -126,7 +132,7 @@ jobs:
|
||||||
- name: ubuntu cp package images from prod to preview bucket
|
- name: ubuntu cp package images from prod to preview bucket
|
||||||
if: matrix.platform == 'ubuntu-latest'
|
if: matrix.platform == 'ubuntu-latest'
|
||||||
env:
|
env:
|
||||||
prefix: ${{ steps.prefix.outputs.prefix }}
|
prefix: ${{ needs.changes.outputs.preview_folder }}
|
||||||
run: |
|
run: |
|
||||||
aws s3 cp ./packages/gui/src-tauri/target/release/bundle/deb/gui_0.1.0_amd64.deb \
|
aws s3 cp ./packages/gui/src-tauri/target/release/bundle/deb/gui_0.1.0_amd64.deb \
|
||||||
"s3://preview.gui.tea.xyz/$prefix/gui.deb"
|
"s3://preview.gui.tea.xyz/$prefix/gui.deb"
|
||||||
|
@ -139,7 +145,7 @@ jobs:
|
||||||
message: |
|
message: |
|
||||||
**installer for ${{ matrix.platform }} is at**: [here](http://preview.gui.tea.xyz.s3-website-us-east-1.amazonaws.com/${{steps.prefix.outputs.prefix}}/gui.deb)
|
**installer for ${{ matrix.platform }} is at**: [here](http://preview.gui.tea.xyz.s3-website-us-east-1.amazonaws.com/${{steps.prefix.outputs.prefix}}/gui.deb)
|
||||||
```bash
|
```bash
|
||||||
http://preview.gui.tea.xyz.s3-website-us-east-1.amazonaws.com/${{steps.prefix.outputs.prefix}}/gui.deb
|
http://preview.gui.tea.xyz.s3-website-us-east-1.amazonaws.com/${{ needs.changes.outputs.preview_folder }}/gui.deb
|
||||||
```
|
```
|
||||||
copy-paste into a browser to download
|
copy-paste into a browser to download
|
||||||
|
|
||||||
|
@ -152,6 +158,6 @@ jobs:
|
||||||
message: |
|
message: |
|
||||||
**installer for ${{ matrix.platform }} is at**: [here](http://preview.gui.tea.xyz.s3-website-us-east-1.amazonaws.com/${{steps.prefix.outputs.prefix}}/gui.dmg)
|
**installer for ${{ matrix.platform }} is at**: [here](http://preview.gui.tea.xyz.s3-website-us-east-1.amazonaws.com/${{steps.prefix.outputs.prefix}}/gui.dmg)
|
||||||
```bash
|
```bash
|
||||||
http://preview.gui.tea.xyz.s3-website-us-east-1.amazonaws.com/${{steps.prefix.outputs.prefix}}/gui.dmg
|
http://preview.gui.tea.xyz.s3-website-us-east-1.amazonaws.com/${{ needs.changes.outputs.preview_folder }}/gui.dmg
|
||||||
```
|
```
|
||||||
copy-paste into a browser to download
|
copy-paste into a browser to download
|
6
.github/workflows/main.yml
vendored
6
.github/workflows/main.yml
vendored
|
@ -50,7 +50,11 @@ jobs:
|
||||||
toolchain: stable
|
toolchain: stable
|
||||||
- name: install app dependencies and build it
|
- name: install app dependencies and build it
|
||||||
run: pnpm install && pnpm --filter gui build
|
run: pnpm install && pnpm --filter gui build
|
||||||
|
- uses: aws-actions/configure-aws-credentials@v1
|
||||||
|
with:
|
||||||
|
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||||
|
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||||
|
aws-region: us-east-1
|
||||||
build_tauri:
|
build_tauri:
|
||||||
needs: changes
|
needs: changes
|
||||||
if: needs.changes.outputs.tauri == 'true'
|
if: needs.changes.outputs.tauri == 'true'
|
||||||
|
|
|
@ -2,10 +2,6 @@
|
||||||
@tailwind components;
|
@tailwind components;
|
||||||
@tailwind utilities;
|
@tailwind utilities;
|
||||||
|
|
||||||
html {
|
|
||||||
background-color: #1a1a1a;
|
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: "pp-neue-machina";
|
font-family: "pp-neue-machina";
|
||||||
|
@ -17,6 +13,11 @@ html {
|
||||||
src: url("../static/fonts/Sono-Light.woff2");
|
src: url("../static/fonts/Sono-Light.woff2");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
html {
|
||||||
|
background-color: #1a1a1a;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
@layer base {
|
@layer base {
|
||||||
html {
|
html {
|
||||||
font-family: sono, sans-serif;
|
font-family: sono, sans-serif;
|
||||||
|
|
Loading…
Reference in a new issue