diff --git a/.github/workflows/actions/install/action.yml b/.github/workflows/actions/install/action.yml new file mode 100644 index 0000000..01cf303 --- /dev/null +++ b/.github/workflows/actions/install/action.yml @@ -0,0 +1,24 @@ +name: Install Tools & Dependencies +description: Installs pnpm, Node.js & package dependencies + +runs: + using: composite + steps: + - name: Setup PNPM + uses: pnpm/action-setup@v2.4.0 + with: + run_install: false + standalone: true + package_json_file: web/package.json + version: 8 + + - name: Setup Node + uses: actions/setup-node@v3 + with: + node-version: 20 + cache: pnpm + cache-dependency-path: 'app' + + - name: Install dependencies + run: pnpm install + shell: bash diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 0000000..397803e --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,39 @@ + + +name: 🚚 Deploy + +on: + push: + branches: + - master + +env: + NODE_OPTIONS: "--max_old_space_size=8192" + +jobs: + deploy: + runs-on: ubuntu-20.04 + permissions: + contents: write + concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Install Tools & Dependencies + uses: ./.github/actions/install + + - name: Build + working-directory: ./web + run: pnpm run build + + - name: Edgeserver Upload + uses: lvkdotsh/edgeserver-action@v0.1.2-pre.4 + with: + app_id: "207908995488658940" + server: https://api.edgeserver.io + token: ${{ secrets.SIGNAL_TOKEN }} + directory: web/dist diff --git a/web/package.json b/web/package.json index a79b5a6..29cd216 100644 --- a/web/package.json +++ b/web/package.json @@ -5,7 +5,8 @@ "scripts": { "test": "echo \"Error: no test specified\" && exit 1", "dev": "vite", - "start": "vite" + "start": "vite", + "build": "vite build" }, "keywords": [], "author": "V3X Labs BV.",