Skip to content

Commit

Permalink
Fix build script and add deployment action
Browse files Browse the repository at this point in the history
  • Loading branch information
liberostelios committed Jun 17, 2024
1 parent b663ebd commit 572a7c1
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 8 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Deploy to GitHub Pages

on:
push:
branches:
- main

jobs:
build-and-deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '18'

- name: Install dependencies
run: npm install

- name: Build the project
run: npm run build

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist
cname: ninja.cityjson.org
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
{
"name": "ninja",
"version": "0.7.0",
"version": "0.8.0",
"private": true,
"scripts": {
"start": "parcel public/index.html",
"build": "parcel build public/index.html public/*.svg --out-dir ./dist/ --public-url . --no-cache"
"build": "parcel build public/index.html --public-url . --no-cache"
},
"main": "main.js",
"dependencies": {
"@fortawesome/fontawesome-free": "^5.15.4",
"bootstrap": "^4.6.1",
Expand Down
15 changes: 11 additions & 4 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -402,9 +402,16 @@
:class="[ file_loaded ? 'text-white' : 'text-dark' ]"
href="#"
><img
:src="logoUrl"
:class="[ file_loaded ? 'logo-regular' : 'logo-big' ]"
> <span :class="{ 'text-big' : !file_loaded }">ninja</span></a>
v-if=" !file_loaded "
:src="require('url:../public/logoBlack.svg')"
class="logo-big"
>
<img
v-else
:src="require('url:../public/logoWhite.svg')"
class="logo-regular"
>
<span :class="{ 'text-big' : !file_loaded }">ninja</span></a>
<div class="d-flex justify-content-end align-items-center col-auto p-0">
<div
v-show="loading"
Expand Down Expand Up @@ -643,7 +650,7 @@
class="card-link"
href="https://github.com/cityjson/ninja"
target="_blank"
><i class="fab fa-github"></i> ninja v0.7.0</a>
><i class="fab fa-github"></i> ninja v0.8.0</a>
</div>
</div>
</div>
Expand Down
1 change: 0 additions & 1 deletion src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import '@fortawesome/fontawesome-free/css/all.css';
import 'bootstrap/dist/css/bootstrap.css';
import 'bootstrap';


// Vue.config.productionTip = false;

Vue.use( Vue2Filters );
Expand Down

0 comments on commit 572a7c1

Please sign in to comment.