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

Commit

Permalink
Updated README.md with info to build .exe file
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandrevryghem committed Mar 11, 2022
1 parent 2d6ae53 commit 989038a
Show file tree
Hide file tree
Showing 8 changed files with 49 additions and 13 deletions.
13 changes: 7 additions & 6 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
/.git
/.github
/.idea
/dist
/node_modules
/out
/.git/
/.github/
/.idea/
/build/
/dist/
/node_modules/
/out/
/.gitignore
/main.js
*.md
3 changes: 2 additions & 1 deletion .github/workflows/build-docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ jobs:
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Push to Docker Hub
uses: docker/build-push-action@v2
with:
push: true
tags: alexandrevryghem/guido-desktop:latest
tags: ${{ secrets.DOCKER_USERNAME }}/guido-desktop:latest
21 changes: 21 additions & 0 deletions .github/workflows/deploy-on-server.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: Deploy on Server
on:
workflow_run:
workflows: [ "Build Docker image" ]
types:
- completed
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Restart Development website 🚀
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST }}
port: ${{ secrets.PORT }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.PRIVATE_KEY }}
script: |
/usr/local/bin/docker pull ${{ secrets.DOCKER_USERNAME }}/guido-desktop:latest
/usr/local/bin/docker-compose -f ${{ secrets.DOCKER_COMPOSE_PATH }}/docker-compose.yml up -d
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# See http://help.github.com/ignore-files/ for more about ignoring files.

# Compiled output
/build
!build/icon.png
/dist
/tmp
/out-tsc
Expand Down
15 changes: 13 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

[![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)
[![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)
[![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)

## Requirements

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

### Build Docker image
### Build & push Docker image

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

⚠ Don't forget to create the `DOCKER_USERNAME` and `DOCKER_PASSWORD` secrets in the repository
`Settings>Secrets>Actions`. The `DOCKER_PASSWORD` can also be an Access Token from DockerHub
`Settings>Secrets>Actions`. The `DOCKER_PASSWORD` can also be an Access Token from DockerHub.

### Deploy on production server

This action is automatically triggered when the `Build Docker image` action is completed. Before using it make sure that
you copy the docker-compose.yml on your server and edit it see [above](#build-docker-image).

⚠ This action requires you to also create the `HOST`, `PORT`, `USERNAME` and `PRIVATE_KEY` secrets in
`Settings>Secrets>Actions`. Otherwise, the GitHub action won't be able to sign in on your server (Make sure your user
has the right permissions to execute the `docker` and `docker-compose` command). The last secret you need to create is
`DOCKER_COMPOSE_PATH` with the location of you docker-compose file on your server (without tailing `/`).
Binary file added build/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "guide-app-desktop",
"authors": "Alexandre Vryghem & Mathias Van den Cruijce",
"author": "Alexandre Vryghem & Mathias Van den Cruijce",
"description": "D3 based floorplan builder",
"version": "0.0.0",
"version": "1.0.0",
"main": "main.js",
"scripts": {
"ng": "ng",
Expand Down

0 comments on commit 989038a

Please sign in to comment.