Skip to content

Commit

Permalink
update ci.yml and env vars
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandzors committed Nov 25, 2024
1 parent 5f373b5 commit 4198862
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,9 @@ jobs:
id: build
run: |
sed -i -e 's#alexsguardian.net#dev.alexsugardian.net#g' ./src/components/SiteMeta.astro
sed -i -e 's#{GA-ID}#'${{ secrets.GOOGLE_ANALYTICS_ID_DEV }}'#g' ./src/layouts/DefaultLayout.astro
sed -i '51i \ \ \ \ <Announcement />' ./src/layouts/DefaultLayout.astro
npm install
npm run build
npm run build:dev
- name: htmlproofer test
uses: chabad360/htmlproofer@master
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
"dev": "astro dev",
"start": "astro dev",
"build": "astro build",
"preview": "astro preview"
"preview": "astro preview",
"build:dev": "VITE_GA_ID=${{secrets.GOOGLE_ANALYTICS_ID_DEV }} EMAIL_RECIEVER=${{secrets.EMAIL_RECIEVER }} EMAIL_SENDER=${{secrets.EMAIL_SENDER }} EMAIL_USER=${{secrets.EMAIL_USER }} EMAIL_USER=${{secrets.EMAIL_USER }} EMAIL_PASS=${{secrets.EMAIL_PASS }} EMAIL_HOST=${{secrets.EMAIL_HOST }} EMAIL_PORT=${{secrets.EMAIL_PORT }} VITE_TURNSTILE_SITE_KEY=${{secrets.TURNSTILE_SITE_KEY }} TURNSTILE_SECRET=${{secrets.TURNSTILE_SECRET }} npm run build",
"build:prod": "VITE_GA_ID=${{secrets.GOOGLE_ANALYTICS_ID }} EMAIL_RECIEVER=${{secrets.EMAIL_RECIEVER }} EMAIL_SENDER=${{secrets.EMAIL_SENDER }} EMAIL_USER=${{secrets.EMAIL_USER }} EMAIL_USER=${{secrets.EMAIL_USER }} EMAIL_PASS=${{secrets.EMAIL_PASS }} EMAIL_HOST=${{secrets.EMAIL_HOST }} EMAIL_PORT=${{secrets.EMAIL_PORT }} VITE_TURNSTILE_SITE_KEY=${{secrets.TURNSTILE_SITE_KEY }} TURNSTILE_SECRET=${{secrets.TURNSTILE_SECRET }} npm run build"
},
"devDependencies": {
"@astrojs/mdx": "^3.1.9",
Expand Down
2 changes: 1 addition & 1 deletion src/components/ContactForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { ref, onMounted } from "vue";
// Track form submission state and response message
const responseMessage = ref<string>();
const isSubmitting = ref<boolean>(false);
const TURNSTILE_SITE_KEY = import.meta.env.TURNSTILE_SITE_KEY || process.env.TURNSTILE_SITE_KEY;
const TURNSTILE_SITE_KEY = import.meta.env.TURNSTILE_SITE_KEY || process.env.VITE_TURNSTILE_SITE_KEY;
// Cloudflare Turnstile
onMounted(() => {
Expand Down
4 changes: 3 additions & 1 deletion src/layouts/DefaultLayout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import Header from '../components/Header.astro'
import Footer from '../components/Footer.astro'
import Announcement from '../components/Announcement.astro'
const GoogleAnaltyicsKey = import.meta.env.GA_ID || process.env.VITE_GA_ID;
const {
title = "Alex's Guardian",
description = "Alex's Guardian is an IT consulting & servicing company that specializes in end users and small businesses.",
Expand Down Expand Up @@ -43,7 +45,7 @@ const {
dataLayer.push(arguments)
}
gtag('js', new Date())
gtag('config', '{GA-ID}')
gtag('config', GoogleAnaltyicsKey)
</script>
<!-- End Google Analytics Script -->

Expand Down

0 comments on commit 4198862

Please sign in to comment.