Skip to content

Commit

Permalink
I assure you that it works in my machine
Browse files Browse the repository at this point in the history
(Ok, it fixes a bug from mine and updates the CI workflow)
  • Loading branch information
qgustavor committed May 26, 2024
1 parent 66a8be0 commit eafeefb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
10 changes: 4 additions & 6 deletions .github/workflows/continuous-integration-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,13 @@ jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '18.x'
uses: actions/setup-node@v4

- name: Cache dependencies
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
Expand All @@ -28,7 +26,7 @@ jobs:
- run: npm run build

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build
2 changes: 1 addition & 1 deletion src/routes/+layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const trailingSlash = true
export const load = async ({ url, params }) => {
const { pathname } = url

const lang = params.lang ?? pathname.match(/\/(en|pt)\//)?.[0] || 'en'
const lang = params.lang ?? (pathname.match(/\/(en|pt)\//)?.[0] || 'en')
const route = pathname.replace(new RegExp(`/${lang}/`), '/')

await setLocale(lang)
Expand Down

0 comments on commit eafeefb

Please sign in to comment.