Skip to content

Commit

Permalink
feat: redirect blog to mastdatabase; implement cf pages (#47)
Browse files Browse the repository at this point in the history
  • Loading branch information
davwheat committed Jun 26, 2023
1 parent e023abc commit f1c9b34
Show file tree
Hide file tree
Showing 128 changed files with 2,801 additions and 14,810 deletions.
109 changes: 10 additions & 99 deletions .github/workflows/smoketest.yml
Expand Up @@ -6,62 +6,25 @@ on:
workflow_dispatch:

env:
NODE_VERSION: 16.x
NODE_VERSION: 20.x

jobs:
install:
runs-on: ubuntu-latest
name: Prepare repo

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v2
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'yarn'

- name: Cache node_modules for other runs
uses: actions/cache@v2
id: module-cache
with:
path: ./node_modules
key: ${{ runner.os }}-node-modules-${{ secrets.CACHE_VERSION }}-${{ github.sha }}-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-node-modules-${{ secrets.CACHE_VERSION }}-${{ github.sha }}-
${{ runner.os }}-node-modules-${{ secrets.CACHE_VERSION }}-
- name: Install dependencies on cache miss
run: yarn install --frozen-lockfile
if: steps.yarn-cache.outputs.cache-hit != 'true'

- name: Install project dependencies from cache
run: yarn --prefer-offline --frozen-lockfile
if: steps.yarn-cache.outputs.cache-hit == 'true'

formatting:
runs-on: ubuntu-latest
needs: [install]
name: Verify formatting

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'yarn'

- name: Restore dependencies cache
uses: actions/cache@v2
id: module-cache
with:
path: ./node_modules
key: ${{ runner.os }}-node-modules-${{ secrets.CACHE_VERSION }}-${{ github.sha }}-${{ hashFiles('yarn.lock') }}
- name: Install dependencies
run: yarn install --immutable

- name: Verify formatting
run: yarn format:check
Expand All @@ -73,34 +36,21 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
persist-credentials: false

- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'yarn'

- name: Restore dependencies cache
uses: actions/cache@v2
id: module-cache
with:
path: ./node_modules
key: ${{ runner.os }}-node-modules-${{ secrets.CACHE_VERSION }}-${{ github.sha }}-${{ hashFiles('yarn.lock') }}

- name: Restore Gatsby cache
uses: actions/cache@v2
id: gatsbyCache
with:
path: ./.cache
key: ${{ runner.os }}-gatsby-cache-${{ secrets.CACHE_VERSION }}-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-gatsby-cache-${{ secrets.CACHE_VERSION }}-
- name: Install dependencies
run: yarn install --immutable

- name: Restore Gatsby build output
uses: actions/cache@v2
uses: actions/cache@v3
id: gatsbyOut
with:
path: ./public
Expand All @@ -111,42 +61,3 @@ jobs:
- name: Build site
run: yarn build:ci

deploy:
name: Deploy site to production
runs-on: ubuntu-latest
needs: [build, formatting, install]

# Only deploy on push to deploy branch
if: github.ref == 'refs/heads/deploy' && github.event_name == 'push'

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Restore Gatsby cache
uses: actions/cache@v2
id: gatsbyCache
with:
path: ./.cache
key: ${{ runner.os }}-gatsby-cache-${{ secrets.CACHE_VERSION }}-${{ hashFiles('yarn.lock') }}

- name: Restore Gatsby output
uses: actions/cache@v2
id: gatsbyOut
with:
path: ./public
key: ${{ runner.os }}-gatsby-out-${{ secrets.CACHE_VERSION }}-${{ hashFiles('yarn.lock') }}-${{ github.sha }}

- name: Upload a compiled website
uses: actions/upload-artifact@v2
with:
name: Compiled website
path: public/

- name: Deploy to GitHub Pages 🚀
uses: JamesIves/github-pages-deploy-action@4.1.0
with:
branch: prod
folder: public
clean: true
403 changes: 202 additions & 201 deletions .yarn/releases/yarn-3.5.1.cjs → .yarn/releases/yarn-3.6.0.cjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .yarnrc.yml
@@ -1,3 +1,3 @@
nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-3.5.1.cjs
yarnPath: .yarn/releases/yarn-3.6.0.cjs
16 changes: 0 additions & 16 deletions blog/2021/07/18/welcome.mdx

This file was deleted.

0 comments on commit f1c9b34

Please sign in to comment.