From b0d12ed9b0769eb15d60534c62a81b7376b4bada Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20N=C3=A9grier?= Date: Sun, 11 Apr 2021 23:36:06 +0200 Subject: [PATCH] Reworking deployment script --- .github/workflows/build-and-deploy.yml | 14 ++++++++++++++ src/index.ts | 3 +++ webpack.prod.js | 2 +- 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml index e7227b2..9c91b8b 100644 --- a/.github/workflows/build-and-deploy.yml +++ b/.github/workflows/build-and-deploy.yml @@ -19,6 +19,20 @@ jobs: - name: Optimize map uses: thecodingmachine/map-optimizer-action@master + - uses: actions/setup-node@v2 + with: + node-version: '14.x' + registry-url: 'https://registry.npmjs.org' + + - name: "Install dependencies" + run: npm install + + - name: "Build scripts" + run: npm run build + + - name: "Move scripts" + run: mv dist/* . + - name: Bash run: | ls -al diff --git a/src/index.ts b/src/index.ts index cdb0c1e..64214a2 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,4 +1,7 @@ /// +// You can write your WorkAdventure script here, if any. +// The "WA" global object is available from anywhere. + console.log('Script started successfully'); WA.openCoWebSite('https://workadventu.re'); diff --git a/webpack.prod.js b/webpack.prod.js index b5695cc..e142e19 100644 --- a/webpack.prod.js +++ b/webpack.prod.js @@ -1,4 +1,4 @@ -const merge = require('webpack-merge'); +const { merge } = require('webpack-merge'); const common = require('./webpack.config.js'); module.exports = merge(common, {