Skip to content

Commit 4f5412b

Browse files
committed
gh actions
1 parent 9a3983a commit 4f5412b

2 files changed

Lines changed: 16 additions & 2 deletions

File tree

.github/workflows/jekyll-gh-pages.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ permissions:
2020
concurrency:
2121
group: "pages"
2222
cancel-in-progress: false
23-
env:
24-
API_KEY: ${{ secrets.API_KEY }}
2523

2624
jobs:
2725
# Build job
@@ -30,13 +28,23 @@ jobs:
3028
steps:
3129
- name: Checkout
3230
uses: actions/checkout@v4
31+
3332
- name: Setup Pages
3433
uses: actions/configure-pages@v5
34+
35+
- name: Inject API Key
36+
run: |
37+
echo "Injecting API_KEY into the build..."
38+
sed -i "s|process.env.API_KEY|'${{ secrets.API_KEY }}'|g" ./FO2/MarketTracker/market-track.js
39+
3540
- name: Build with Jekyll
41+
env:
42+
API_KEY: ${{ secrets.API_KEY }}
3643
uses: actions/jekyll-build-pages@v1
3744
with:
3845
source: ./
3946
destination: ./_site
47+
4048
- name: Upload artifact
4149
uses: actions/upload-pages-artifact@v3
4250

@@ -45,6 +53,7 @@ jobs:
4553
environment:
4654
name: github-pages
4755
url: ${{ steps.deployment.outputs.page_url }}
56+
4857
runs-on: ubuntu-latest
4958
needs: build
5059
steps:

_config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
title: My Jekyll Site
2+
description: A simple Jekyll site
3+
baseurl: ""
4+
url: "https://amygutierrez.github.io"
5+
api_key: "<%= ENV['API_KEY'] %>"

0 commit comments

Comments
 (0)