Skip to content

Commit

Permalink
make API key env var
Browse files Browse the repository at this point in the history
  • Loading branch information
petr-hajek committed Sep 19, 2024
1 parent c2aacf0 commit f9bda3a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ jobs:
- name: Install dependencies
run: npm ci
- name: Build
env:
VITE_MAPTILER_API_KEY: ${{ secrets.MAPTILER_API_KEY }}
run: npm run build

- name: Deploy
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node_modules/
node_modules/
.env.local
4 changes: 2 additions & 2 deletions src/config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export default {
// Replace with YOUR_MAPTILER_API_KEY - this key is restricted to MapTiler Documentation pages.
MAPTILER_API_KEY: "qC6zBtR7VUaKtyyiLcJq",
// Replace with YOUR MAPTILER API KEY
MAPTILER_API_KEY: import.meta.env.VITE_MAPTILER_API_KEY,
};

0 comments on commit f9bda3a

Please sign in to comment.