Skip to content

Commit

Permalink
Merge pull request #166 from Tibz-Dankan/switch/sqlite
Browse files Browse the repository at this point in the history
feat: increase jwt exp to 9 hours
  • Loading branch information
Tibz-Dankan authored Sep 6, 2024
2 parents ab306b0 + 69bafdb commit 8eb12d1
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 25 deletions.
71 changes: 47 additions & 24 deletions .github/workflows/deploy-to-render.yaml
Original file line number Diff line number Diff line change
@@ -1,38 +1,17 @@
name: Test and Deploy To Render
name: Deploy To Render

on:
push:
branches:
- main

jobs:
test-deploy:
deploy:
runs-on: ubuntu-latest

env:
APPCRONS_STAG_DSN: ${{ secrets.APPCRONS_STAG_DSN }}
REDIS_URL: ${{ secrets.REDIS_URL }}

permissions:
deployments: write
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Check SQLite version
run: sqlite3 --version

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.23"

- name: Install dependencies
run: make install

- name: Run tests
run: make stage # Runs tests in the staging environment

- uses: actions/checkout@v3
- uses: JorgeLNJunior/[email protected]
with:
service_id: ${{ secrets.RENDER_SERVICE_ID }}
Expand All @@ -42,3 +21,47 @@ jobs:
github_deployment: true
deployment_environment: "production"
github_token: ${{ secrets.ACCESS_TOKEN_GITHUB }}
# name: Test and Deploy To Render

# on:
# push:
# branches:
# - main

# jobs:
# test-deploy:
# runs-on: ubuntu-latest

# env:
# APPCRONS_STAG_DSN: ${{ secrets.APPCRONS_STAG_DSN }}
# REDIS_URL: ${{ secrets.REDIS_URL }}

# permissions:
# deployments: write
# steps:
# - name: Checkout code
# uses: actions/checkout@v3

# - name: Check SQLite version
# run: sqlite3 --version

# - name: Set up Go
# uses: actions/setup-go@v4
# with:
# go-version: "1.23"

# - name: Install dependencies
# run: make install

# - name: Run tests
# run: make stage # Runs tests in the staging environment

# - uses: JorgeLNJunior/[email protected]
# with:
# service_id: ${{ secrets.RENDER_SERVICE_ID }}
# api_key: ${{ secrets.RENDER_API_KEY }}
# clear_cache: true
# wait_deploy: true
# github_deployment: true
# deployment_environment: "production"
# github_token: ${{ secrets.ACCESS_TOKEN_GITHUB }}
2 changes: 1 addition & 1 deletion internal/services/jwt.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
func SignJWTToken(userId string) (string, error) {
token := jwt.NewWithClaims(jwt.SigningMethodHS256, jwt.MapClaims{
"userId": userId,
"exp": time.Now().Add(3 * time.Hour).Unix(),
"exp": time.Now().Add(9 * time.Hour).Unix(),
"iat": time.Now().Unix(),
})

Expand Down

0 comments on commit 8eb12d1

Please sign in to comment.