Skip to content

Commit

Permalink
Merge pull request #2 from haxgun/rework-js
Browse files Browse the repository at this point in the history
Rework js
  • Loading branch information
haxgun authored Oct 29, 2023
2 parents 5a527d2 + d4c73a6 commit 2efaebb
Show file tree
Hide file tree
Showing 50 changed files with 866 additions and 773 deletions.
13 changes: 13 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"env": {
"browser": true,
"es2021": true
},
"extends": "eslint:recommended",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"rules": {
}
}
38 changes: 32 additions & 6 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,48 @@
name: Deploy

on:
push:
branches:
- main
name: Deploy
- rework-js
jobs:
web-deploy:
name: Deploy
run-linters:
name: Run linters
runs-on: ubuntu-latest
steps:
- name: Get latest code
uses: actions/[email protected]
- name: Checkout repo
uses: actions/checkout@v3

- name: Setup Node
uses: actions/[email protected]

- name: Install dependencies
run: npm install --package-lock-only && npm ci

- name: Run linters
uses: wearerequired/lint-action@v2
with:
eslint: true
prettier: true

deploy:
name: Build
needs: run-linters
runs-on: ubuntu-latest
steps:
- name: Install ssh keys
run: |
install -m 600 -D /dev/null ~/.ssh/id_rsa
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
ssh-keyscan -H ${{ secrets.SSH_HOST }} > ~/.ssh/known_hosts
- name: Connect and Pull
run: ssh ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} "cd ${{ secrets.WORK_DIR }} && git checkout main && git pull && exit"
run: |
if [ $GITHUB_REF == 'refs/heads/main' ]; then
ssh ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} "cd ${{ secrets.WORK_DIR }} && git checkout main && git pull && npm install --package-lock-only && npm ci && npm run build && exit"
else
ssh ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} "cd ${{ secrets.TEST_WORK_DIR }} && git checkout ${GITHUB_REF##*/} && git pull && npm install --package-lock-only && npm ci && npm run build && exit"
fi
- name: Cleanup
run: rm -rf ~/.ssh
19 changes: 19 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,22 @@ fabric.properties
/.idea/inspectionProfiles/Project_Default.xml
/.idea/vcs.xml
/.idea/workspace.xml
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
node_modules
dist
dist-ssr
*.local
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
package-lock.json
1 change: 1 addition & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
Loading

0 comments on commit 2efaebb

Please sign in to comment.