Skip to content

Commit

Permalink
Update code formatting settings
Browse files Browse the repository at this point in the history
  • Loading branch information
jqshuv committed Oct 15, 2024
1 parent 2b3b628 commit 5f0946d
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
root = true

[*]
indent_style = tab
indent_style = space
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
indent_size = 4

[*.yml]
indent_style = space
indent_size = 4
64 changes: 64 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: 🚀 Deploy

on:
push:
tags:
- 'v*'

jobs:
test:
name: 🧪 Test
runs-on: ubuntu-latest
steps:
- name: ⬇️ Checkout
uses: actions/checkout@v4
- name: 📦 Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9
- name: 📦 Install Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: 'pnpm'
- name: 💽 Setup Enviroment
run: cp wrangler.example.toml wrangler.toml
- name: ⚙️ Install Dependencies
run: pnpm install --frozen-lockfile
- name: 📋 Test
run: pnpm test

deploy:
name: 🚀 Deploy
runs-on: ubuntu-latest
needs: test
steps:
- name: ⬇️ Checkout
uses: actions/checkout@v4
- name: 📦 Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9
- name: 📦 Install Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: 'pnpm'
- name: 💽 Setup Enviroment 1/3
run: cp wrangler.example.toml wrangler.toml
- name: 💽 Setup Enviroment 2/3
uses: ciiiii/toml-editor@1.0.0
with:
file: wrangler.toml
key: kv_namespaces[0].id
value: ${{ secrets.KV_NAMESPACE_ID }}
- name: 💽 Setup Enviroment 3/3
uses: ciiiii/toml-editor@1.0.0
with:
file: wrangler.toml
key: vars.AUTH_SECRET
value: ${{ secrets.AUTH_SECRET }}
- name: ⚙️ Install Dependencies
run: pnpm install --frozen-lockfile


4 changes: 1 addition & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs

name: 🔩 Test CI

on:
push:
branches: [ "main" ]
tags: []
pull_request:
branches: [ "main" ]

Expand Down
12 changes: 10 additions & 2 deletions .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@
"printWidth": 140,
"singleQuote": true,
"semi": true,
"useTabs": true,
"tabWidth": 4
"useTabs": false,
"tabWidth": 4,
"overrides": [
{
"files": ".github/**/*.yml",
"options": {
"tabWidth": 2
}
}
]
}

0 comments on commit 5f0946d

Please sign in to comment.