Skip to content

Commit

Permalink
Active netlify (#94)
Browse files Browse the repository at this point in the history
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
  • Loading branch information
torn4dom4n and autofix-ci[bot] authored Dec 24, 2024
1 parent 406944b commit 42163f0
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 98 deletions.
20 changes: 0 additions & 20 deletions .github/workflows/build.yml

This file was deleted.

56 changes: 0 additions & 56 deletions .github/workflows/pages.yml

This file was deleted.

19 changes: 0 additions & 19 deletions .github/workflows/stale.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Supernova

[![Built with Starlight](https://astro.badg.es/v2/built-with-starlight/tiny.svg)](https://starlight.astro.build)
[![Built with Starlight](https://astro.badg.es/v2/built-with-starlight/tiny.svg)](https://starlight.astro.build) [![Netlify Status](https://api.netlify.com/api/v1/badges/a7295f42-7b29-4b6a-b776-bc2802cb3d2b/deploy-status)](https://app.netlify.com/sites/astro-supernova/deploys)

## Getting Started

Expand Down
10 changes: 8 additions & 2 deletions astro.config.ts → astro.config.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// @ts-check

import { defineConfig } from 'astro/config';
import starlight from '@astrojs/starlight';
import tailwind from '@astrojs/tailwind';
Expand All @@ -10,10 +11,15 @@ import remarkMath from 'remark-math';
import { rehypeAutolink } from './plugins/rehype-autolink';
import { remarkReadingTime } from './plugins/remark-reading-time.mjs';

/* https://docs.netlify.com/configure-builds/environment-variables/#read-only-variables */
const NETLIFY_PREVIEW_SITE =
process.env.CONTEXT !== 'production' && process.env.DEPLOY_PRIME_URL;

const site = NETLIFY_PREVIEW_SITE || 'https://astro-supernova.netlify.app';

// https://astro.build/config
export default defineConfig({
site: process.env.CI ? 'https://area44.github.io' : 'http://localhost:4321',
base: '/astro-supernova',
site: site,
markdown: {
remarkPlugins: [remarkMath, remarkReadingTime],
rehypePlugins: [
Expand Down
15 changes: 15 additions & 0 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[[plugins]]
package = "@netlify/plugin-lighthouse"

[build]
command = "pnpm dlx playwright install chromium && astro build"

[[headers]]
for = "/*"
[headers.values]
X-Frame-Options = "DENY"

[[headers]]
for = "/_astro/*"
[headers.values]
Cache-Control = "public, max-age=604800, immutable"

0 comments on commit 42163f0

Please sign in to comment.