-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from haxgun/rework-js
Rework js
- Loading branch information
Showing
50 changed files
with
866 additions
and
773 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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": { | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{} |
Oops, something went wrong.