Skip to content
This repository was archived by the owner on Jan 18, 2023. It is now read-only.

Commit 989038a

Browse files
Updated README.md with info to build .exe file
1 parent 2d6ae53 commit 989038a

File tree

8 files changed

+49
-13
lines changed

8 files changed

+49
-13
lines changed

.dockerignore

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
/.git
2-
/.github
3-
/.idea
4-
/dist
5-
/node_modules
6-
/out
1+
/.git/
2+
/.github/
3+
/.idea/
4+
/build/
5+
/dist/
6+
/node_modules/
7+
/out/
78
/.gitignore
89
/main.js
910
*.md

.github/workflows/build-docker-image.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@ jobs:
1717
with:
1818
username: ${{ secrets.DOCKER_USERNAME }}
1919
password: ${{ secrets.DOCKER_PASSWORD }}
20+
2021
- name: Push to Docker Hub
2122
uses: docker/build-push-action@v2
2223
with:
2324
push: true
24-
tags: alexandrevryghem/guido-desktop:latest
25+
tags: ${{ secrets.DOCKER_USERNAME }}/guido-desktop:latest
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
name: Deploy on Server
3+
on:
4+
workflow_run:
5+
workflows: [ "Build Docker image" ]
6+
types:
7+
- completed
8+
jobs:
9+
deploy:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Restart Development website 🚀
13+
uses: appleboy/ssh-action@master
14+
with:
15+
host: ${{ secrets.HOST }}
16+
port: ${{ secrets.PORT }}
17+
username: ${{ secrets.USERNAME }}
18+
key: ${{ secrets.PRIVATE_KEY }}
19+
script: |
20+
/usr/local/bin/docker pull ${{ secrets.DOCKER_USERNAME }}/guido-desktop:latest
21+
/usr/local/bin/docker-compose -f ${{ secrets.DOCKER_COMPOSE_PATH }}/docker-compose.yml up -d

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# See http://help.github.com/ignore-files/ for more about ignoring files.
22

33
# Compiled output
4+
/build
5+
!build/icon.png
46
/dist
57
/tmp
68
/out-tsc

README.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
[![Deploy on GitHub pages](https://github.com/ucll-ap-guide/guideApp-desktop/actions/workflows/deploy-to-github-pages.yml/badge.svg?branch=main)](https://github.com/ucll-ap-guide/guideApp-desktop/actions/workflows/deploy-to-github-pages.yml)
44
[![Build Docker image](https://github.com/ucll-ap-guide/guideApp-desktop/actions/workflows/build-docker-image.yml/badge.svg?branch=main)](https://github.com/ucll-ap-guide/guideApp-desktop/actions/workflows/build-docker-image.yml)
5+
[![Deploy on Server](https://github.com/ucll-ap-guide/guideApp-desktop/actions/workflows/deploy-on-server.yml/badge.svg?branch=main)](https://github.com/ucll-ap-guide/guideApp-desktop/actions/workflows/deploy-on-server.yml)
56

67
## Requirements
78

@@ -45,10 +46,20 @@ inside the `docker-compose.yml` file.
4546
This action is automatically triggered when new code is pushed on `main` and will update the GitHub page, this doesn't
4647
require any additional setup.
4748

48-
### Build Docker image
49+
### Build & push Docker image
4950

5051
This action is automatically triggered when new code is pushed on `main`, this will automatically build a Docker image
5152
and push it to your DockerHub repository. This image can be used to run the project on a production server.
5253

5354
⚠ Don't forget to create the `DOCKER_USERNAME` and `DOCKER_PASSWORD` secrets in the repository
54-
`Settings>Secrets>Actions`. The `DOCKER_PASSWORD` can also be an Access Token from DockerHub
55+
`Settings>Secrets>Actions`. The `DOCKER_PASSWORD` can also be an Access Token from DockerHub.
56+
57+
### Deploy on production server
58+
59+
This action is automatically triggered when the `Build Docker image` action is completed. Before using it make sure that
60+
you copy the docker-compose.yml on your server and edit it see [above](#build-docker-image).
61+
62+
⚠ This action requires you to also create the `HOST`, `PORT`, `USERNAME` and `PRIVATE_KEY` secrets in
63+
`Settings>Secrets>Actions`. Otherwise, the GitHub action won't be able to sign in on your server (Make sure your user
64+
has the right permissions to execute the `docker` and `docker-compose` command). The last secret you need to create is
65+
`DOCKER_COMPOSE_PATH` with the location of you docker-compose file on your server (without tailing `/`).

build/icon.png

37.6 KB
Loading

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"name": "guide-app-desktop",
3-
"authors": "Alexandre Vryghem & Mathias Van den Cruijce",
3+
"author": "Alexandre Vryghem & Mathias Van den Cruijce",
44
"description": "D3 based floorplan builder",
5-
"version": "0.0.0",
5+
"version": "1.0.0",
66
"main": "main.js",
77
"scripts": {
88
"ng": "ng",

0 commit comments

Comments
 (0)