Skip to content

Commit fe84b79

Browse files
committed
format yaml with 2 spaces, no tabs
1 parent 579a725 commit fe84b79

5 files changed

Lines changed: 146 additions & 139 deletions

File tree

Lines changed: 90 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -1,103 +1,103 @@
11
name: Reusable Deployment Workflow
22

33
on:
4-
workflow_call:
5-
inputs:
6-
is_prod:
7-
required: true
8-
type: boolean
9-
secrets:
10-
APP_DB_URL:
11-
required: true
12-
APP_DB_AUTH_TOKEN:
13-
required: true
14-
NETLIFY_SITE_ID:
15-
required: true
16-
NETLIFY_ACCESS_TOKEN:
17-
required: true
18-
_GITHUB_PRIVATE_KEY:
19-
required: true
20-
REDIS_URL:
21-
required: true
22-
ADMIN_PAGE_PASSWORD:
23-
required: true
24-
EMAIL_ADDRESS:
25-
required: true
26-
EMAIL_PASSWORD:
27-
required: true
28-
ENABLE_EMAILS:
29-
required: true
30-
APPROVAL_EMAIL:
31-
required: true
4+
workflow_call:
5+
inputs:
6+
is_prod:
7+
required: true
8+
type: boolean
9+
secrets:
10+
APP_DB_URL:
11+
required: true
12+
APP_DB_AUTH_TOKEN:
13+
required: true
14+
NETLIFY_SITE_ID:
15+
required: true
16+
NETLIFY_ACCESS_TOKEN:
17+
required: true
18+
_GITHUB_PRIVATE_KEY:
19+
required: true
20+
REDIS_URL:
21+
required: true
22+
ADMIN_PAGE_PASSWORD:
23+
required: true
24+
EMAIL_ADDRESS:
25+
required: true
26+
EMAIL_PASSWORD:
27+
required: true
28+
ENABLE_EMAILS:
29+
required: true
30+
APPROVAL_EMAIL:
31+
required: true
3232

3333
jobs:
34-
build-and-deploy:
35-
runs-on: ubuntu-latest
36-
permissions:
37-
contents: write
38-
steps:
39-
- name: Checkout code
40-
uses: actions/checkout@v5
41-
with:
42-
fetch-depth: 0
34+
build-and-deploy:
35+
runs-on: ubuntu-latest
36+
permissions:
37+
contents: write
38+
steps:
39+
- name: Checkout code
40+
uses: actions/checkout@v5
41+
with:
42+
fetch-depth: 0
4343

44-
- name: Install pnpm
45-
uses: pnpm/action-setup@v5
46-
with:
47-
version: 10
44+
- name: Install pnpm
45+
uses: pnpm/action-setup@v5
46+
with:
47+
version: 10
4848

49-
- name: Use Node.js
50-
uses: actions/setup-node@v5
51-
with:
52-
node-version: 24.14.0
53-
cache: 'pnpm'
49+
- name: Use Node.js
50+
uses: actions/setup-node@v5
51+
with:
52+
node-version: 24.14.0
53+
cache: 'pnpm'
5454

55-
- name: Install Dependencies
56-
run: pnpm i
55+
- name: Install Dependencies
56+
run: pnpm i
5757

58-
- name: Build database
59-
env:
60-
APP_DB_URL: ${{ secrets.APP_DB_URL }}
61-
APP_DB_AUTH_TOKEN: ${{ secrets.APP_DB_AUTH_TOKEN }}
62-
run: |
63-
pnpm db:setup
64-
pnpm db:update
58+
- name: Build database
59+
env:
60+
APP_DB_URL: ${{ secrets.APP_DB_URL }}
61+
APP_DB_AUTH_TOKEN: ${{ secrets.APP_DB_AUTH_TOKEN }}
62+
run: |
63+
pnpm db:setup
64+
pnpm db:update
6565
66-
- name: Build app
67-
env:
68-
APP_DB_URL: ${{ secrets.APP_DB_URL }}
69-
APP_DB_AUTH_TOKEN: ${{ secrets.APP_DB_AUTH_TOKEN }}
70-
GITHUB_PRIVATE_KEY: ${{ secrets._GITHUB_PRIVATE_KEY }}
71-
REDIS_URL: ${{ secrets.REDIS_URL }}
72-
ADMIN_PAGE_PASSWORD: ${{ secrets.ADMIN_PAGE_PASSWORD }}
73-
EMAIL_ADDRESS: ${{ secrets.EMAIL_ADDRESS }}
74-
EMAIL_PASSWORD: ${{ secrets.EMAIL_PASSWORD }}
75-
ENABLE_EMAILS: ${{ secrets.ENABLE_EMAILS }}
76-
APPROVAL_EMAIL: ${{ secrets.APPROVAL_EMAIL }}
77-
run: pnpm build
66+
- name: Build app
67+
env:
68+
APP_DB_URL: ${{ secrets.APP_DB_URL }}
69+
APP_DB_AUTH_TOKEN: ${{ secrets.APP_DB_AUTH_TOKEN }}
70+
GITHUB_PRIVATE_KEY: ${{ secrets._GITHUB_PRIVATE_KEY }}
71+
REDIS_URL: ${{ secrets.REDIS_URL }}
72+
ADMIN_PAGE_PASSWORD: ${{ secrets.ADMIN_PAGE_PASSWORD }}
73+
EMAIL_ADDRESS: ${{ secrets.EMAIL_ADDRESS }}
74+
EMAIL_PASSWORD: ${{ secrets.EMAIL_PASSWORD }}
75+
ENABLE_EMAILS: ${{ secrets.ENABLE_EMAILS }}
76+
APPROVAL_EMAIL: ${{ secrets.APPROVAL_EMAIL }}
77+
run: pnpm build
7878

79-
- name: Get latest commit message
80-
id: msg
81-
run: |
82-
echo "COMMIT_MESSAGE<<EOF" >> $GITHUB_ENV
83-
git log -1 --pretty=%B >> $GITHUB_ENV
84-
echo "EOF" >> $GITHUB_ENV
79+
- name: Get latest commit message
80+
id: msg
81+
run: |
82+
echo "COMMIT_MESSAGE<<EOF" >> $GITHUB_ENV
83+
git log -1 --pretty=%B >> $GITHUB_ENV
84+
echo "EOF" >> $GITHUB_ENV
8585
86-
- name: Deploy to Netlify
87-
run: |
88-
pnpm --package=netlify-cli dlx netlify deploy --no-build \
89-
--dir build \
90-
--site ${{ secrets.NETLIFY_SITE_ID }} \
91-
--auth ${{ secrets.NETLIFY_ACCESS_TOKEN }} \
92-
--message "${{ env.COMMIT_MESSAGE }}" \
93-
${{ inputs.is_prod && '--prod' || '' }}
86+
- name: Deploy to Netlify
87+
run: |
88+
pnpm --package=netlify-cli dlx netlify deploy --no-build \
89+
--dir build \
90+
--site ${{ secrets.NETLIFY_SITE_ID }} \
91+
--auth ${{ secrets.NETLIFY_ACCESS_TOKEN }} \
92+
--message "${{ env.COMMIT_MESSAGE }}" \
93+
${{ inputs.is_prod && '--prod' || '' }}
9494
95-
- name: Create deployment tag
96-
if: ${{ success() && inputs.is_prod }}
97-
run: |
98-
TIMESTAMP=$(date -u +'%Y%m%d-%H%M%S')
99-
TAG="deploy-${TIMESTAMP}-${GITHUB_SHA::7}"
100-
git config user.name "github-actions[bot]"
101-
git config user.email "github-actions[bot]@users.noreply.github.com"
102-
git tag -a "$TAG" -m "Deploy $TAG"
103-
git push --no-verify origin "$TAG"
95+
- name: Create deployment tag
96+
if: ${{ success() && inputs.is_prod }}
97+
run: |
98+
TIMESTAMP=$(date -u +'%Y%m%d-%H%M%S')
99+
TAG="deploy-${TIMESTAMP}-${GITHUB_SHA::7}"
100+
git config user.name "github-actions[bot]"
101+
git config user.email "github-actions[bot]@users.noreply.github.com"
102+
git tag -a "$TAG" -m "Deploy $TAG"
103+
git push --no-verify origin "$TAG"
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
name: preview deployment
22
on:
3-
workflow_dispatch:
3+
workflow_dispatch:
44

55
jobs:
6-
call-deploy:
7-
uses: ./.github/workflows/_deploy-reusable.yaml
8-
permissions:
9-
contents: write
10-
with:
11-
is_prod: false
12-
secrets: inherit
6+
call-deploy:
7+
uses: ./.github/workflows/_deploy-reusable.yaml
8+
permissions:
9+
contents: write
10+
with:
11+
is_prod: false
12+
secrets: inherit

.github/workflows/deploy-prod.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
name: production deployment
22
on:
3-
workflow_dispatch:
3+
workflow_dispatch:
44

55
jobs:
6-
call-deploy:
7-
uses: ./.github/workflows/_deploy-reusable.yaml
8-
permissions:
9-
contents: write
10-
with:
11-
is_prod: true
12-
secrets: inherit
6+
call-deploy:
7+
uses: ./.github/workflows/_deploy-reusable.yaml
8+
permissions:
9+
contents: write
10+
with:
11+
is_prod: true
12+
secrets: inherit

.github/workflows/test.yaml

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,38 @@
11
name: Test Workflow
22

33
on:
4-
push:
5-
branches: [main]
6-
pull_request:
7-
workflow_dispatch:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
workflow_dispatch:
88

99
jobs:
10-
test:
11-
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.draft == false }}
12-
runs-on: ubuntu-latest
13-
14-
steps:
15-
- name: Checkout code
16-
uses: actions/checkout@v5
17-
18-
- name: Install pnpm
19-
uses: pnpm/action-setup@v5
20-
with:
21-
version: 10
22-
23-
- name: Use Node.js
24-
uses: actions/setup-node@v5
25-
with:
26-
node-version: 24.14.0
27-
cache: 'pnpm'
28-
29-
- name: Install Dependencies
30-
run: pnpm i
31-
32-
- name: Test database
33-
run: |
34-
pnpm db:setup:catdat
35-
pnpm db:update
36-
37-
- name: Redundancy check
38-
run: pnpm db:redundancies
10+
test:
11+
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.draft == false }}
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v5
17+
18+
- name: Install pnpm
19+
uses: pnpm/action-setup@v5
20+
with:
21+
version: 10
22+
23+
- name: Use Node.js
24+
uses: actions/setup-node@v5
25+
with:
26+
node-version: 24.14.0
27+
cache: 'pnpm'
28+
29+
- name: Install Dependencies
30+
run: pnpm i
31+
32+
- name: Test database
33+
run: |
34+
pnpm db:setup:catdat
35+
pnpm db:update
36+
37+
- name: Redundancy check
38+
run: pnpm db:redundancies

.prettierrc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@
1313
"options": {
1414
"parser": "svelte"
1515
}
16+
},
17+
{
18+
"files": "*.yaml",
19+
"options": {
20+
"useTabs": false,
21+
"tabWidth": 2
22+
}
1623
}
1724
]
1825
}

0 commit comments

Comments
 (0)