Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Andrew testing #1288

Merged
merged 225 commits into from
Oct 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
225 commits
Select commit Hold shift + click to select a range
ac43b80
Add verification for oldPassword
Isthisanmol Aug 24, 2024
5234089
Create a map package and remove unnecessary file
Tadjaur Aug 25, 2024
8686361
fix the map authorization issue
Tadjaur Aug 25, 2024
325e30d
Fix map preview not loading
Tadjaur Aug 25, 2024
0ffb189
add dependencies version of required package
Tadjaur Aug 25, 2024
eb60e85
Merge branch 'andrew_testing' into Fix-oldPassword-verification
Isthisanmol Aug 26, 2024
ea2b7af
✨ adapt modal to sheet on mobile
mikib0 Aug 27, 2024
ecb79a7
Merge branch 'andrew_testing' into Fix-oldPassword-verification
Isthisanmol Aug 30, 2024
a64fa31
Merge branch 'andrew_testing' into Fix-oldPassword-verification
Isthisanmol Aug 31, 2024
d560ae0
WIP(auth): 🚧 generate access and refresh tokens
mikib0 Sep 4, 2024
6afa3af
WIP(auth): 🐛 fix typo'ed field
mikib0 Sep 5, 2024
3ab51e3
✨ check auth solely in auth middleware
mikib0 Sep 6, 2024
ba79268
WIP(auth:client): 🚧 store access and refresh tokens on login
mikib0 Sep 6, 2024
fe08e64
WIP(auth:server): 🚧 add migration for refreshTokens table
mikib0 Sep 6, 2024
631b872
WIP(auth): 🚧 add token refreshing
mikib0 Sep 6, 2024
4625e21
WIP(auth): 🚧 handle logout [skip ci]
mikib0 Sep 6, 2024
59c6641
feed cards refactor and ui changes
taronaleksanian Sep 6, 2024
298f64e
Merge branch 'andrew_testing' of github.com:andrew-bierman/PackRat in…
taronaleksanian Sep 6, 2024
91f0965
Merge pull request #1220 from andrew-bierman/feat/card-component
andrew-bierman Sep 7, 2024
b26f95d
⚡️ add native toasts
andrew-bierman Sep 7, 2024
e54550c
fix: fix profile screen crop
taronaleksanian Sep 7, 2024
532879a
Merge branch 'andrew_testing' into Fix-oldPassword-verification
Isthisanmol Sep 7, 2024
4d04b39
Merge pull request #1222 from andrew-bierman/fix/profile-screen-crop
taronaleksanian Sep 7, 2024
67f4776
⚡️ replace native base usage
andrew-bierman Sep 7, 2024
c20839c
⚡️ improve feed preview ui on native
andrew-bierman Sep 7, 2024
44b5ad1
Merge pull request #1221 from andrew-bierman/feat/native-toasts
andrew-bierman Sep 7, 2024
5f72d4f
add trips init
taronaleksanian Sep 7, 2024
57804ee
Merge branch 'andrew_testing' of github.com:andrew-bierman/PackRat in…
taronaleksanian Sep 7, 2024
5964892
✨ finalize access & refresh token auth
mikib0 Sep 8, 2024
33790dc
Merge branch 'andrew_testing' into feat/revise-auth
mikib0 Sep 8, 2024
4d783a0
normalize trip data
taronaleksanian Sep 8, 2024
c370680
Merge branch 'andrew_testing' into improve-ai-chat
Isthisanmol Sep 8, 2024
c934de6
fix trip places
taronaleksanian Sep 8, 2024
f3a080c
Add activity to tripcard
Isthisanmol Sep 8, 2024
f8537ff
Improve visibilty in create trip
Isthisanmol Sep 8, 2024
3835e11
fix selected packs
Isthisanmol Sep 8, 2024
263d81b
change setpackidparam
Isthisanmol Sep 8, 2024
aff140e
add score to pack secondary card
taronaleksanian Sep 8, 2024
838d5cd
add trip create quick action
taronaleksanian Sep 8, 2024
ade9140
add backend preview action
taronaleksanian Aug 26, 2024
0d4de6d
add log for workflow run
taronaleksanian Aug 26, 2024
c45a988
update the backend deployment workflow
Tadjaur Aug 26, 2024
d03c33a
run backend workflow on push
Tadjaur Aug 26, 2024
8fbd042
use cloud flare action to migrate the database
Tadjaur Sep 7, 2024
e6d5f83
updadate wrangler version and update wrangler config
Tadjaur Sep 7, 2024
83db983
hard code github token
Tadjaur Sep 7, 2024
c19dc5d
specify the account id
Tadjaur Sep 7, 2024
b29d57a
specify the account id
Tadjaur Sep 7, 2024
21b564c
specify the account id
Tadjaur Sep 8, 2024
a92cc17
manually upload secret
Tadjaur Sep 8, 2024
7de0b4e
remove secret from wrangler.toml
Tadjaur Sep 9, 2024
1a8ca1c
Add required environment variables
Tadjaur Sep 9, 2024
e573197
remove duplicated vector index
Tadjaur Sep 9, 2024
d47d475
remove hard coded environment variables
Tadjaur Sep 9, 2024
174f70a
separat feed fetching
pinocchio-life-like Sep 9, 2024
e7174de
Merge pull request #1223 from andrew-bierman/fix/similar-packs-card
andrew-bierman Sep 9, 2024
2bdcb2e
Merge branch 'andrew_testing' of github.com:andrew-bierman/PackRat in…
taronaleksanian Sep 9, 2024
1998981
chore: 🔨 transition to vectorize V2
mikib0 Sep 9, 2024
d5cc499
Update backend-preview.yml
Tadjaur Sep 9, 2024
da63314
Update backend.yml
Tadjaur Sep 9, 2024
ef84bfe
Merge branch 'andrew_testing' of github.com:andrew-bierman/PackRat in…
taronaleksanian Sep 9, 2024
d3e10e3
add editPackModal
Isthisanmol Sep 9, 2024
165cb68
Merge branch 'andrew_testing' into improve-ai-chat
Isthisanmol Sep 9, 2024
d3c805b
Merge branch 'andrew_testing' into Fix-oldPassword-verification
Isthisanmol Sep 9, 2024
c2f4533
fix login and signup screen
Tadjaur Sep 10, 2024
0d9608e
Merge pull request #1229 from andrew-bierman/improve-pack-details
andrew-bierman Sep 10, 2024
2d47d47
Merge branch 'andrew_testing' into feat/trips
andrew-bierman Sep 10, 2024
9f53b81
Merge pull request #1227 from andrew-bierman/enhance/feed
andrew-bierman Sep 10, 2024
3f4b410
Merge pull request #1230 from andrew-bierman/fix/login-screen-not-scr…
andrew-bierman Sep 10, 2024
371eb4b
Merge branch 'andrew_testing' into feat/revise-auth
mikib0 Sep 10, 2024
b74f67e
Merge pull request #1218 from andrew-bierman/feat/revise-auth
mikib0 Sep 10, 2024
dce9fdd
add react-leaflet
taronaleksanian Sep 10, 2024
dbb7cb1
Merge branch 'andrew_testing' of github.com:andrew-bierman/PackRat in…
taronaleksanian Sep 10, 2024
1973dbb
Merge branch 'andrew_testing' into migate-to-vectorizeV2
mikib0 Sep 10, 2024
b2ceae2
Merge pull request #1231 from andrew-bierman/chore/transition-to-vect…
andrew-bierman Sep 10, 2024
c771869
add action buttons on tripcardheader
Isthisanmol Sep 12, 2024
a23c377
add details to tripdetails
Isthisanmol Sep 12, 2024
0ee58a5
Merge branch 'andrew_testing' into improve-ai-chat
Isthisanmol Sep 12, 2024
5cf07e2
give maxwidth to list
Isthisanmol Sep 12, 2024
d684785
Merge branch 'andrew_testing' into Fix-oldPassword-verification
Isthisanmol Sep 12, 2024
af66fd5
feed refactor
taronaleksanian Sep 12, 2024
28ced46
Merge pull request #1226 from andrew-bierman/feat/preview-version-of-api
andrew-bierman Sep 13, 2024
f055dfb
Merge pull request #1193 from andrew-bierman/fix-map
andrew-bierman Sep 13, 2024
a586a96
Merge branch 'andrew_testing' into improve-ai-chat
andrew-bierman Sep 13, 2024
6021b0d
Merge pull request #1199 from andrew-bierman/improve-ai-chat
andrew-bierman Sep 13, 2024
60ea0d5
Merge branch 'andrew_testing' into fix/feed-issues
andrew-bierman Sep 13, 2024
4d49bf5
Merge pull request #1234 from andrew-bierman/fix/feed-issues
andrew-bierman Sep 13, 2024
da5cb86
Merge branch 'andrew_testing' into Fix-oldPassword-verification
Isthisanmol Sep 13, 2024
0fc0e8f
add scrollview for suggestionlist
Isthisanmol Sep 13, 2024
5e5bfa5
onclick changes to onPress
Isthisanmol Sep 13, 2024
a6e28b8
Merge pull request #1235 from andrew-bierman/fix-chat-feature
andrew-bierman Sep 14, 2024
f59583b
fix: feed query
taronaleksanian Sep 14, 2024
575b85a
Merge pull request #1236 from andrew-bierman/fix/feed-issue
andrew-bierman Sep 14, 2024
3f6c9f9
fix conflicts
taronaleksanian Sep 14, 2024
f32bc01
regenarate migrations
taronaleksanian Sep 14, 2024
74bcb76
Merge branch andrew_testing of github.com:andrew-bierman/PackRat into…
taronaleksanian Sep 14, 2024
b2238be
fix feed query for trips
taronaleksanian Sep 14, 2024
dd1221f
Create a sub-action for duplicated task
Tadjaur Sep 14, 2024
4ec4ed8
Merge branch 'andrew_testing' into fix/backend-deployment-failure
Tadjaur Sep 15, 2024
5eb4c55
persist theme state
pinocchio-life-like Sep 15, 2024
d3817f1
Add new environment variable
Tadjaur Sep 15, 2024
2f07188
add button for adding item
Isthisanmol Sep 15, 2024
8064827
fix login issue
taronaleksanian Sep 15, 2024
1c46db7
add trips pagination
taronaleksanian Sep 16, 2024
99ee054
Merge pull request #1224 from andrew-bierman/feat/trips
taronaleksanian Sep 16, 2024
0b31228
regenerate migrations
taronaleksanian Sep 16, 2024
acb9191
Merge pull request #1242 from andrew-bierman/fix/persist_theme_state
taronaleksanian Sep 16, 2024
2dd2ffc
Merge pull request #1239 from andrew-bierman/fix/backend-deployment-f…
andrew-bierman Sep 16, 2024
fc4ed03
Merge pull request #1240 from andrew-bierman/fix/auth-issue
andrew-bierman Sep 16, 2024
1633055
fix(server): 🐛 signup issue
mikib0 Sep 18, 2024
dcfceb3
Merge pull request #1248 from andrew-bierman/fix/signup-issue
taronaleksanian Sep 18, 2024
bcabd05
Merge branch 'andrew_testing' of github.com:andrew-bierman/PackRat in…
taronaleksanian Sep 18, 2024
4c169e8
Merge pull request #1243 from andrew-bierman/fix/migrations
taronaleksanian Sep 18, 2024
d88e52a
use expo router for chat on native
Isthisanmol Sep 19, 2024
d7ca888
add safe area for search
taronaleksanian Sep 19, 2024
64fbabd
Merge pull request #1251 from andrew-bierman/fix/search-area
taronaleksanian Sep 19, 2024
01996fe
Merge branch 'andrew_testing' into Fix-oldPassword-verification
Isthisanmol Sep 19, 2024
dc1c38d
Merge pull request #1252 from andrew-bierman/development
taronaleksanian Sep 19, 2024
b6cd4bd
Merge branch 'andrew_testing' into enhance-chat-native
Isthisanmol Sep 19, 2024
4826fb3
change cards in profile page
Isthisanmol Sep 22, 2024
c0f6456
maps init
taronaleksanian Sep 22, 2024
ee7f111
add offline map migration
taronaleksanian Sep 22, 2024
5ffad7d
Merge pull request #1258 from andrew-bierman/feat/add-offline-maps-table
taronaleksanian Sep 22, 2024
7c1ce69
Implementing Map Cards
MuhammadHassan03 Sep 22, 2024
98ec0fe
Merge branch 'andrew_testing' of github.com:andrew-bierman/PackRat in…
taronaleksanian Sep 22, 2024
db892c7
fix migration
taronaleksanian Sep 22, 2024
32cfd30
Merge branch 'andrew_testing' of github.com:andrew-bierman/PackRat in…
taronaleksanian Sep 22, 2024
fc6a6c5
Merge pull request #1260 from andrew-bierman/feat/add-offline-maps-table
taronaleksanian Sep 22, 2024
f02b48b
Merge branch 'andrew_testing' of github.com:andrew-bierman/PackRat in…
taronaleksanian Sep 22, 2024
4e325cd
Merge pull request #1259 from andrew-bierman/feat/map-screen
taronaleksanian Sep 22, 2024
fe26344
Merge branch 'fix/map' of github.com:andrew-bierman/PackRat into fix/map
taronaleksanian Sep 22, 2024
0f9a6e4
downloaded maps screen finalize
taronaleksanian Sep 22, 2024
65e43dd
add name unique with owner id
taronaleksanian Sep 23, 2024
34480ca
Merge pull request #1262 from andrew-bierman/feat/add-offline-maps-table
taronaleksanian Sep 23, 2024
0981a38
Merge branch 'andrew_testing' into enhance-chat-native
Isthisanmol Sep 23, 2024
ad6d7b5
Merge pull request #1249 from andrew-bierman/enhance-chat-native
taronaleksanian Sep 23, 2024
f650e5d
Merge pull request #1191 from andrew-bierman/Fix-oldPassword-verifica…
taronaleksanian Sep 23, 2024
dfc0ce1
Merge branch 'andrew_testing' of github.com:andrew-bierman/PackRat in…
taronaleksanian Sep 23, 2024
2379ec8
add feed sorting
taronaleksanian Sep 23, 2024
679c5d8
Merge pull request #1263 from andrew-bierman/feat/feed-sort
taronaleksanian Sep 23, 2024
c257806
Converted item weights to user's preferred unit
MuhammadHassan03 Sep 24, 2024
8cf6e2a
update score on items change
taronaleksanian Sep 25, 2024
ef3de6c
add total score to scores object
taronaleksanian Sep 25, 2024
49cbc5f
use user new cards
Isthisanmol Sep 25, 2024
85da7eb
Merge branch 'andrew_testing' of github.com:andrew-bierman/PackRat in…
taronaleksanian Sep 25, 2024
409a812
make footer optional in primary card
Isthisanmol Sep 25, 2024
1275fe5
remove redundent files
Isthisanmol Sep 25, 2024
a0851a4
ui changes
Isthisanmol Sep 25, 2024
fa6d9e7
Remove console logs and update imports in TableContainer and BasicTab…
MuhammadHassan03 Sep 25, 2024
0b52b76
Merge pull request #1265 from andrew-bierman/feature/smallest-unit-co…
taronaleksanian Sep 25, 2024
e5ff78e
Merge branch 'andrew_testing' into feat/item-score-observer
Isthisanmol Sep 25, 2024
25d641d
Merge pull request #1266 from andrew-bierman/feat/item-score-observer
taronaleksanian Sep 25, 2024
1db3545
Merge branch 'andrew_testing' into enhance-profile-cards
Isthisanmol Sep 25, 2024
877dda6
add border to cards
Isthisanmol Sep 25, 2024
09efd23
use table container component in pack container
Isthisanmol Sep 25, 2024
83c0a27
fix see all in settings
taronaleksanian Sep 26, 2024
c7cde00
Merge pull request #1256 from andrew-bierman/enhance-profile-cards
taronaleksanian Sep 26, 2024
68e1834
remove unitdropdown and add item modal
Isthisanmol Sep 26, 2024
507ca70
add trip details to feed query
taronaleksanian Sep 26, 2024
f526655
Merge pull request #1268 from andrew-bierman/fix/trip-card
taronaleksanian Sep 26, 2024
0b9c6fb
use CascadedDropdown in table actions
Isthisanmol Sep 26, 2024
8d15fb6
Merge pull request #1267 from andrew-bierman/fix-item-visibility-crea…
taronaleksanian Sep 26, 2024
ac566ed
fix: pack weight
taronaleksanian Sep 27, 2024
96c6713
Merge pull request #1269 from andrew-bierman/use-CascadedDropdown-in-…
taronaleksanian Sep 27, 2024
7946a33
Merge branch development of github.com:andrew-bierman/PackRat into de…
taronaleksanian Sep 27, 2024
8f9d1cf
fix: fix action dropdown
taronaleksanian Sep 28, 2024
49301aa
Merge branch 'development' of github.com:andrew-bierman/PackRat into …
taronaleksanian Sep 28, 2024
cebc8e1
fix: weight unit convert
taronaleksanian Sep 29, 2024
940fe5b
settings preview query genereic solution
taronaleksanian Sep 29, 2024
02f865e
push
pinocchio-life-like Sep 29, 2024
846c8be
Merge pull request #1274 from andrew-bierman/rebase/preview_style
taronaleksanian Sep 29, 2024
1a7a28a
refactor and images setup
pinocchio-life-like Sep 29, 2024
8f55833
define schema functions
pinocchio-life-like Sep 29, 2024
7201e83
finalize get images for items where it exists
pinocchio-life-like Sep 30, 2024
ae61ebd
generate bucket count
pinocchio-life-like Sep 30, 2024
87c5a6d
Merge pull request #1275 from andrew-bierman/fix/items-backend
taronaleksanian Sep 30, 2024
0fbddf0
feat: ✨ save geojson to r2 storage
mikib0 Oct 1, 2024
81f6b18
Merge pull request #1276 from andrew-bierman/feat/save-geojson-to-s3
taronaleksanian Oct 1, 2024
2f29e21
feat(server): ✨ retrieve geojson from endpoint
mikib0 Oct 1, 2024
e949989
fix list pagination
taronaleksanian Oct 1, 2024
f1d44c5
Merge branch 'development' of github.com:andrew-bierman/PackRat into …
taronaleksanian Oct 1, 2024
57e8c66
change pagination default limit
taronaleksanian Oct 1, 2024
17e8ff3
Merge pull request #1272 from andrew-bierman/fix/settings-preview
taronaleksanian Oct 1, 2024
5c1534a
add trip scoring
taronaleksanian Oct 2, 2024
a6bb94c
add if statement to migration
taronaleksanian Oct 2, 2024
e878b93
Merge pull request #1278 from andrew-bierman/feat/trips-scoring
taronaleksanian Oct 2, 2024
17fdfb2
Merge branch 'development' of github.com:andrew-bierman/PackRat into …
taronaleksanian Oct 2, 2024
71221a6
Merge pull request #1277 from andrew-bierman/feat/retrieve-geojson-fr…
taronaleksanian Oct 2, 2024
8d1b668
Merge branch 'fix/map' of github.com:andrew-bierman/PackRat into fix/map
taronaleksanian Oct 2, 2024
88dedf0
use geojson files
taronaleksanian Oct 3, 2024
7393582
Merge pull request #1261 from andrew-bierman/fix/map
taronaleksanian Oct 3, 2024
2da5883
fix api url
taronaleksanian Oct 3, 2024
f7795a0
changes in style
Isthisanmol Oct 4, 2024
a3bb69a
Merge pull request #1281 from andrew-bierman/fix-trip-details
taronaleksanian Oct 4, 2024
2d63329
style changes
Isthisanmol Oct 4, 2024
ce98d51
Merge pull request #1283 from andrew-bierman/fix-create-trip-pack-items
taronaleksanian Oct 4, 2024
b23c447
fix getme query
taronaleksanian Oct 4, 2024
ad58967
changes in style
Isthisanmol Oct 4, 2024
a5e758a
fix(server): enhance similar packs & items logic
mikib0 Oct 5, 2024
46808f5
Merge branch 'development' into enhance-similar-packs-items-logic
mikib0 Oct 5, 2024
324dcce
Merge pull request #1284 from andrew-bierman/fix-overlapping-elements
taronaleksanian Oct 5, 2024
ca3b51d
ci(worker): fix deployment failure
mikib0 Oct 6, 2024
f2ae90b
ci(worker): add `GEOJSON_BUCKET` binding to wrangler config
mikib0 Oct 6, 2024
ff4226f
ci(worker): gen .env with `NODE_ENV=development` to fix api Internal …
mikib0 Oct 6, 2024
d6c8b7c
ci(worker): fix naming, description and typos
mikib0 Oct 6, 2024
0b393ad
chore(server): ✨ introduce `.dev.vars` for secrets
mikib0 Oct 6, 2024
b02360a
Merge branch 'development' into fix/api-workflow
mikib0 Oct 6, 2024
fc13cf8
Merge pull request #1285 from andrew-bierman/fix/api-workflow
taronaleksanian Oct 6, 2024
8a5bf16
Merge branch 'development' of github.com:andrew-bierman/PackRat into …
taronaleksanian Oct 6, 2024
73f9733
styles changes
Isthisanmol Oct 6, 2024
5a3cdd0
make feedData consistent
Isthisanmol Oct 6, 2024
22893c0
Merge branch 'development' into fix-native-ui
Isthisanmol Oct 6, 2024
1752be9
Merge pull request #1286 from andrew-bierman/fix-native-ui
taronaleksanian Oct 6, 2024
2d4a5be
chore(server): gitignore .dev.vars
mikib0 Oct 6, 2024
819a417
Merge pull request #1287 from andrew-bierman/chore/ignore-devdotvars
taronaleksanian Oct 6, 2024
1b2d2fb
Merge branch 'development' of github.com:andrew-bierman/PackRat into …
taronaleksanian Oct 6, 2024
2f6b1d8
add check on feed preview validate list data
taronaleksanian Oct 6, 2024
a2dc98b
fix(api): 🐛 filter current pack/item from similar packs/items result
mikib0 Oct 6, 2024
21c8bff
Merge pull request #1257 from andrew-bierman/enhance-similar-packs-it…
taronaleksanian Oct 6, 2024
6b9269d
separate preview migrations folder
taronaleksanian Oct 8, 2024
b9f119d
add migrations dir to wrangler toml
taronaleksanian Oct 8, 2024
ac97cd9
change for workflow
taronaleksanian Oct 8, 2024
3801370
Merge pull request #1270 from andrew-bierman/development
taronaleksanian Oct 8, 2024
998d965
Merge branch 'main' of github.com:andrew-bierman/PackRat into update-…
taronaleksanian Oct 8, 2024
857a8e0
Merge pull request #1289 from andrew-bierman/update-with-main
taronaleksanian Oct 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
103 changes: 103 additions & 0 deletions .github/actions/deploy-cloudflare-worker/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
name: 'Deploy worker'
description: 'Deploys worker'
inputs:
WORKERS_AI_API_KEY:
description: 'The Workers AI API Key'
required: true
VECTORIZE_API_KEY:
description: 'The Vectorize API Key'
required: true
BUCKET_ACCESS_KEY_ID:
description: 'The Bucket Access Key ID'
required: true
BUCKET_SECRET_KEY:
description: 'The Bucket Secret Key'
required: true
GOOGLE_CLIENT_SECRET:
description: 'The Google client secret'
required: true
JWT_SECRET:
description: 'The JWT secret'
required: true
MAPBOX_ACCESS_TOKEN:
description: 'The Mapbox access token'
required: true
OPENAI_API_KEY:
description: 'The OpenAI API Key'
required: true
OPENWEATHER_KEY:
description: 'The OpenWeather API Key'
required: true
REFRESH_TOKEN_SECRET:
description: 'The refresh token secret'
required: true
SEND_GRID_API_KEY:
description: 'The sendgrid API Key'
required: true
STMP_PASSWORD:
description: 'The smtp password'
required: true
X_AMZ_SECURITY_TOKEN:
description: 'The X-Amz-Security-Token'
required: true
JWT_VERIFICATION_KEY:
description: 'The JWT verification key'
required: true
CLOUDFLARE_API_TOKEN:
description: 'Cloudflare API Token'
required: true
CLOUDFLARE_ACCOUNT_ID:
description: 'Cloudflare Account ID'
required: true
CLOUDFLARE_ENVIRONMENT:
description: 'Cloudflare Environment'
required: true
type: choice
options:
- preview
- production
runs:
using: 'composite'
steps:
- name: Deploy worker
uses: cloudflare/[email protected]
with:
wranglerVersion: '3.75.0'
apiToken: ${{ inputs.CLOUDFLARE_API_TOKEN }}
accountId: ${{ inputs.CLOUDFLARE_ACCOUNT_ID }}
workingDirectory: server
# INFO: We need to upload secret manually because the default secrets input of this action `cloudflare/[email protected]` use the `wrangler secret put` command to upload secrets but this command will do not work non-interactive context.
preCommands: >
echo '---Generate and upload secrets---' &&
echo '>> Generate secrets file' &&
echo '{}' | jq '
.BUCKET_ACCESS_KEY_ID="${{ inputs.BUCKET_ACCESS_KEY_ID }}" |
.BUCKET_SECRET_KEY="${{ inputs.BUCKET_SECRET_KEY }}" |
.GOOGLE_CLIENT_SECRET="${{ inputs.GOOGLE_CLIENT_SECRET }}" |
.JWT_SECRET="${{ inputs.JWT_SECRET }}" |
.JWT_VERIFICATION_KEY="${{ inputs.JWT_VERIFICATION_KEY }}" |
.MAPBOX_ACCESS_TOKEN="${{ inputs.MAPBOX_ACCESS_TOKEN }}" |
.OPENAI_API_KEY="${{ inputs.OPENAI_API_KEY }}" |
.OPENWEATHER_KEY="${{ inputs.OPENWEATHER_KEY }}" |
.REFRESH_TOKEN_SECRET="${{ inputs.REFRESH_TOKEN_SECRET }}" |
.SEND_GRID_API_KEY="${{ inputs.SEND_GRID_API_KEY }}" |
.STMP_PASSWORD="${{ inputs.STMP_PASSWORD }}" |
.VECTORIZE_API_KEY="${{ inputs.VECTORIZE_API_KEY }}" |
.WORKERS_AI_API_KEY="${{ inputs.WORKERS_AI_API_KEY }}" |
.X_AMZ_SECURITY_TOKEN="${{ inputs.X_AMZ_SECURITY_TOKEN }}"
' > secrets.json &&
echo '<< Secrets file generated' &&
echo '>> Upload secrets' &&
yarn wrangler secret bulk --env ${{ inputs.CLOUDFLARE_ENVIRONMENT }} secrets.json &&
echo '<< Secrets uploaded'
command: deploy src/index.ts --env ${{ inputs.CLOUDFLARE_ENVIRONMENT }}
packageManager: yarn
env:
CI: true
NO_D1_WARNING: true
WRANGLER_LOG: debug
WRANGLER_LOG_SANITIZE: false

- name: Print wrangler extra logs on failure
if: failure()
uses: ./.github/actions/print-wrangler-logs
40 changes: 40 additions & 0 deletions .github/actions/migrate-d1-database/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: 'Migrate DB'
description: 'Applies DB migrations'
inputs:
CLOUDFLARE_API_TOKEN:
description: 'Cloudflare API Token'
required: true
CLOUDFLARE_ACCOUNT_ID:
description: 'Cloudflare Account ID'
required: true
CLOUDFLARE_ENVIRONMENT:
description: 'Cloudflare Environment'
required: true
type: choice
options:
- preview
- production
runs:
using: 'composite'
steps:
- name: Migrate database
uses: cloudflare/[email protected]
with:
wranglerVersion: '3.75.0'
apiToken: ${{ inputs.CLOUDFLARE_API_TOKEN }}
accountId: ${{ inputs.CLOUDFLARE_ACCOUNT_ID }}
workingDirectory: server
preCommands: |
nl -w1 -s': ' wrangler.toml
command: |
d1 migrations apply ${{ inputs.CLOUDFLARE_ENVIRONMENT }} --remote --env ${{ inputs.CLOUDFLARE_ENVIRONMENT }}
packageManager: yarn
env:
NO_D1_WARNING: true
CI: true
WRANGLER_LOG: debug
WRANGLER_LOG_SANITIZE: false

- name: Print wrangler extra logs on failure
if: failure()
uses: ./.github/actions/print-wrangler-logs
13 changes: 13 additions & 0 deletions .github/actions/print-wrangler-logs/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: 'Print Wrangler Logs'
description: 'Prints Wrangler logs files if exist'
runs:
using: 'composite'
steps:
- name: Print the last wrangler log file
shell: bash
run: |
cat "$(ls -t /home/runner/.config/.wrangler/logs/* 2> /dev/null | head -n 1)" 2> /dev/null || true;
- name: Delete wrangler log files after printing
shell: bash
run: |
rm /home/runner/.config/.wrangler/logs/* || true;
80 changes: 80 additions & 0 deletions .github/actions/setup-wrangler-toml-and-dotenv/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: 'Generate Wrangler TOML and Dotenv File'
description: 'Generates wrangler.toml and .env files for Cloudflare Workers'
inputs:
APP_URL:
description: 'The Application URL'
required: true
AWS_SIGN_ALGORITHM:
description: 'The AWS sign algorithm'
required: true
BUCKET_ENDPOINT:
description: 'The bucket endpoint'
required: true
BUCKET_NAME:
description: 'The bucket name'
required: true
BUCKET_REGION:
description: 'The bucket region'
required: true
BUCKET_SERVICE:
description: 'The bucket service'
required: true
BUCKET_SESSION_TOKEN:
description: 'The bucket session token'
required: true
environment:
description: 'The current environment'
required: true
CLOUDFLARE_ACCOUNT_ID:
description: 'Cloudflare Account ID'
required: true
DB_ID:
description: 'The database ID'
required: true
GOOGLE_CLIENT_ID:
description: 'Google Client ID'
required: true
STMP_EMAIL:
description: 'SMTP Email'
required: true
VECTOR_INDEX_NAME:
description: 'The vector index'
required: true
runs:
using: 'composite'
steps:
- name: Generate wrangler.toml and .env
shell: bash
working-directory: ${{ github.workspace }}/server
run: |
echo 'NODE_ENV=development' > .env
echo 'name = "packrat-api"' > wrangler.toml
echo 'main = "src/index.ts"' >> wrangler.toml
echo 'compatibility_date = "2024-03-14"' >> wrangler.toml
echo 'node_compat = true' >> wrangler.toml
echo '[env.${{ inputs.environment }}]' >> wrangler.toml
echo '[[env.${{ inputs.environment }}.d1_databases]]' >> wrangler.toml
echo 'binding = "DB"' >> wrangler.toml
echo 'database_name = "${{ inputs.environment }}"' >> wrangler.toml
echo 'database_id = "${{ inputs.DB_ID }}"' >> wrangler.toml
echo 'migrations_dir = "${{ inputs.MIGRATIONS_PATH }}"' >> wrangler.toml
echo '[[env.${{ inputs.environment }}.r2_buckets]]' >> wrangler.toml
echo 'binding = "GEOJSON_BUCKET"' >> wrangler.toml
echo 'bucket_name = "packrat-geojson-bucket-${{ inputs.environment }}"' >> wrangler.toml
echo '[env.${{ inputs.environment }}.ai]' >> wrangler.toml
echo 'binding = "AI"' >> wrangler.toml
echo '[env.${{ inputs.environment }}.vars]' >> wrangler.toml
echo 'APP_URL = "${{ inputs.APP_URL }}"' >> wrangler.toml
echo 'AWS_SIGN_ALGORITHM = "${{ inputs.AWS_SIGN_ALGORITHM }}"' >> wrangler.toml
echo 'BUCKET_ENDPOINT = "${{ inputs.BUCKET_ENDPOINT }}"' >> wrangler.toml
echo 'BUCKET_NAME = "${{ inputs.BUCKET_NAME }}"' >> wrangler.toml
echo 'BUCKET_REGION = "${{ inputs.BUCKET_REGION }}"' >> wrangler.toml
echo 'BUCKET_SERVICE = "${{ inputs.BUCKET_SERVICE }}"' >> wrangler.toml
echo 'BUCKET_SESSION_TOKEN = ${{ inputs.BUCKET_SESSION_TOKEN }}' >> wrangler.toml
echo 'CLOUDFLARE_ACCOUNT_ID = "${{ inputs.CLOUDFLARE_ACCOUNT_ID }}"' >> wrangler.toml
echo 'GOOGLE_CLIENT_ID = "${{ inputs.GOOGLE_CLIENT_ID }}"' >> wrangler.toml
echo 'NODE_ENV = "${{ inputs.environment }}"' >> wrangler.toml
echo 'OSM_URI = "https://overpass-api.de/api/interpreter"' >> wrangler.toml
echo 'STMP_EMAIL = "${{ inputs.STMP_EMAIL }}"' >> wrangler.toml
echo 'VECTOR_INDEX = "${{ inputs.VECTOR_INDEX_NAME }}"' >> wrangler.toml
echo 'WEATHER_URL = "https://api.openweathermap.org/data/2.5/forecast"' >> wrangler.toml
135 changes: 0 additions & 135 deletions .github/actions/setup-wrangler-toml/action.yml

This file was deleted.

Loading
Loading