Skip to content

Commit

Permalink
Replace webpack by Vite + Add workflows.
Browse files Browse the repository at this point in the history
  • Loading branch information
oskarwrobel committed Dec 3, 2023
1 parent 02b6ab0 commit 2f85fbe
Show file tree
Hide file tree
Showing 33 changed files with 8,645 additions and 7,859 deletions.
31 changes: 27 additions & 4 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,29 @@
{
"extends": "ckeditor5",
"parserOptions": {
"ecmaVersion": 2017
}
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module"
},
"ignorePatterns": [
"coverage",
"dist"
],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended"
],
// Common JS and TS rules.
"rules": {
"prettier/prettier": ["error", {
"useTabs": false,
"tabWidth": 2,
"printWidth": 120
}],

// ## Possible errors
"no-console": "off",
"no-constant-condition": "off",
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/no-explicit-any": "off"
}
}
38 changes: 38 additions & 0 deletions .github/workflows/CI-CD.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: CI-CD

on:
push:
branches:
- master

jobs:
Test:
uses: ./.github/workflows/CI.yaml

Deploy:
runs-on: ubuntu-latest
needs: Test

steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 16
cache: 'npm'

- name: Install modules
run: npm ci

- name: Build
run: ANALYTICS="UA-11153361-29" npm run build -- --base="/abandoned-house"

- name: Deploy to production
if: github.ref == 'refs/heads/master'
uses: burnett01/rsync-deployments@6.0.0
with:
switches: -avzr --delete
path: dist/
remote_path: ${{ secrets.DEPLOY_PATH }}
remote_host: ${{ secrets.DEPLOY_HOST }}
remote_user: ${{ secrets.DEPLOY_USER }}
remote_key: ${{ secrets.DEPLOY_KEY }}
22 changes: 22 additions & 0 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: CI

on:
pull_request:
workflow_call:

jobs:
Test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 16
cache: 'npm'

- name: Install modules
run: npm ci

- name: Lint
run: npm run lint
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules
dist
.idea
coverage
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Abandoned House Game
====================

PoC of game based on interactive SVG illustrations

[![Build status](https://github.com/oskarwrobel/abandoned-house-game/actions/workflows/CI-CD.yaml/badge.svg?event=push)](https://github.com/oskarwrobel/abandoned-house-game/actions/workflows/CI-CD.yaml)
Loading

0 comments on commit 2f85fbe

Please sign in to comment.