The second iteration of theyorkshire.dev built with Gatsby and hosted with Netlify
-
Install the Gatsby CLI
npm install -g gatsby-cli
-
Install dependencies
npm install
-
Start the development server
npm run develop
-
Generate a full static production build
npm run build
-
Preview the site as it will appear once deployed
npm run serve
NOTE: Google Analytics token should be set as an environment variable in your CI as ga_token
. The token is picked up at build from node process.env
.
I am using Azure DevOps to build and deploy this website. Depending on the branch a change occurs CD is setup to deploy to either a production Netlify environment or a staging Azure environment.
I have several variables setup in Azure DevOps:
Required for Google Analytics
ga_token
Required to deploy to staging
cdn_endpoint
cdn_profile
cdn_resource_group
storage_account_name
Required to deploy to production
NETLIFY_AUTH_TOKEN
NETLIFY_SITE_ID
- Pull blog posts into a second repository
- Blog post comments
- Blog Pagination
- Blog PWA Notifications
- Ability to subscribe to the blog
- Switch CI/CD to GitHub Workflows
- Configure the website to use CSP and other HTTP headers
- Update staging site to use either Netlify or Azure Static Web Apps