Skip to content

Commit

Permalink
Merge pull request #15 from amatzen/master
Browse files Browse the repository at this point in the history
Added CI to auto build and deploy Svelte app
  • Loading branch information
servicepos authored Sep 1, 2021
2 parents ad3993d + b20109e commit ea1a2d2
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 2 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: GH Pages
on:
push:
branches:
- master
paths:
- docs/**
jobs:
build:
runs-on: ubuntu-latest

defaults:
run:
shell: bash
working-directory: docs

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup Node environment
uses: actions/setup-node@v2
with:
node-version: '14'
cache: 'npm'

- run: npm install

- run: npm run build

- uses: actions/upload-artifact@v2
with:
name: build
path: docs/public

deploy:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v2
with:
name: build

- name: Deploy to GitHub Pages
uses: crazy-max/ghaction-github-pages@v2
with:
target_branch: gh-pages
build_dir: .
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

4 changes: 2 additions & 2 deletions docs/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

<title>Servicepos Printdesk</title>

<link rel='stylesheet' href='/build/bundle.css'>
<script defer src='/build/bundle.js'></script>
<link rel='stylesheet' href='./build/bundle.css'>
<script defer src='./build/bundle.js'></script>
</head>

<body>
Expand Down

0 comments on commit ea1a2d2

Please sign in to comment.