From feabdd462d7e4a5ca3897450fb7b546e14300e0b Mon Sep 17 00:00:00 2001 From: arwe <94793167+qapris@users.noreply.github.com> Date: Tue, 7 Feb 2023 15:35:02 +0300 Subject: [PATCH 1/3] Update Layerfile --- Layerfile | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/Layerfile b/Layerfile index 0767fc2897..226579f695 100644 --- a/Layerfile +++ b/Layerfile @@ -1,22 +1,22 @@ +#This is an example webapp.io configuration for Docker! FROM vm/ubuntu:18.04 - -# To note: Layerfiles create entire VMs, *not* containers! -RUN curl -fSsL https://deb.nodesource.com/setup_12.x | bash && \ - apt-get install nodejs python3 make gcc build-essential \ - libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 libxtst6 xauth xvfb && \ - rm -f /etc/apt/sources.list.d/nodesource.list -# node is a memory hog -MEMORY 2G -ENV NODE_OPTIONS=--max-old-space-size=8192 - -COPY . . -RUN mkdir cypress -RUN npm install -RUN BACKGROUND npm start -RUN BACKGROUND cd cypress && python3 -m http.server 8000 +# To note: Layerfiles create entire VMs, *not* containers! + +# install the latest version of Docker, as in the official Docker installation tutorial. +RUN apt-get update && \ + apt-get install ca-certificates curl gnupg lsb-release && \ + sudo mkdir -p /etc/apt/keyrings && \ + curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg && \ + echo \ + "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" |\ + sudo tee /etc/apt/sources.list.d/docker.list > /dev/null && \ + apt-get update && \ + apt-get install docker-ce docker-ce-cli containerd.io -RUN ./node_modules/.bin/cypress run +# copy files from the repository into this staging server +COPY . . -# start a webserver to view test results -EXPOSE WEBSITE http://localhost:8000 +RUN docker build -t image . +RUN docker run -d -p 80:80 image +EXPOSE WEBSITE http://localhost:80 From 27595f7c2c81dc570bd7707a549a564b8caf3f3a Mon Sep 17 00:00:00 2001 From: arwe <94793167+qapris@users.noreply.github.com> Date: Wed, 8 Mar 2023 06:41:40 +0300 Subject: [PATCH 2/3] Add files via upload --- deploy.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 deploy.yml diff --git a/deploy.yml b/deploy.yml new file mode 100644 index 0000000000..e931af6392 --- /dev/null +++ b/deploy.yml @@ -0,0 +1,22 @@ +name: Deploy +on: [push] + +jobs: + deploy: + name: Deploy + runs-on: ubuntu-latest + permissions: + id-token: write # Needed for auth with Deno Deploy + contents: read # Needed to clone the repository + + steps: + - name: Clone repository + uses: actions/checkout@v3 + + # TODO: add a build step here + + - name: Upload to Deno Deploy + uses: denoland/deployctl@v1 + with: + project: "bitter-snake-12" + entrypoint: "./main.ts" # TODO: update entrypoint From b445a84a74005d58b6d09380842394e2e106a237 Mon Sep 17 00:00:00 2001 From: arwe <94793167+qapris@users.noreply.github.com> Date: Wed, 8 Mar 2023 06:43:58 +0300 Subject: [PATCH 3/3] Create .github/workflows/webpack.yml --- .github/workflows/webpack.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/webpack.yml diff --git a/.github/workflows/webpack.yml b/.github/workflows/webpack.yml new file mode 100644 index 0000000000..9cbbb1ab5b --- /dev/null +++ b/.github/workflows/webpack.yml @@ -0,0 +1,28 @@ +name: NodeJS with Webpack + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [14.x, 16.x, 18.x] + + steps: + - uses: actions/checkout@v3 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + + - name: Build + run: | + npm install + npx webpack