Skip to content

Commit

Permalink
deps upgrade & language swap logic
Browse files Browse the repository at this point in the history
  • Loading branch information
MetinVn committed Jul 23, 2024
1 parent 09af63b commit bf81d38
Show file tree
Hide file tree
Showing 4 changed files with 232 additions and 42 deletions.
22 changes: 11 additions & 11 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@ module.exports = {
root: true,
env: { browser: true, es2020: true },
extends: [
'eslint:recommended',
'plugin:react/recommended',
'plugin:react/jsx-runtime',
'plugin:react-hooks/recommended',
"eslint:recommended",
"plugin:react/recommended",
"plugin:react/jsx-runtime",
"plugin:react-hooks/recommended",
],
ignorePatterns: ['dist', '.eslintrc.cjs'],
parserOptions: { ecmaVersion: 'latest', sourceType: 'module' },
settings: { react: { version: '18.2' } },
plugins: ['react-refresh'],
ignorePatterns: ["dist", ".eslintrc.cjs"],
parserOptions: { ecmaVersion: "latest", sourceType: "module" },
settings: { react: { version: "18.2" } },
plugins: ["react-refresh"],
rules: {
'react-refresh/only-export-components': [
'warn',
"react-refresh/only-export-components": [
"warn",
{ allowConstantExport: true },
],
},
}
};
41 changes: 10 additions & 31 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,51 +1,30 @@
name: Deploy
name: Deploy to GitHub Pages

on:
push:
branches:
- main

jobs:
build:
name: Build
deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Checkout code
uses: actions/checkout@v3

- name: Setup Node
uses: actions/setup-node@v1
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 16
node-version: "16"

- name: Install dependencies
uses: bahmutov/npm-install@v1
run: npm install

- name: Build project
- name: Build
run: npm run build

- name: Upload production-ready build files
uses: actions/upload-artifact@v2
with:
name: production-files
path: ./dist

deploy:
name: Deploy
needs: build
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'

steps:
- name: Download artifact
uses: actions/download-artifact@v2
with:
name: production-files
path: ./dist

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
deploy_key: ${{ secrets.DEPLOY_KEY }}
publish_dir: ./dist
210 changes: 210 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.3",
"postcss": "^8.4.29",
"rollup": "^4.19.0",
"tailwindcss": "^3.3.3",
"vite": "^5.3.4"
}
Expand Down

0 comments on commit bf81d38

Please sign in to comment.