Skip to content

Commit

Permalink
first post
Browse files Browse the repository at this point in the history
  • Loading branch information
MattReimer committed Sep 13, 2023
0 parents commit 4f7c451
Show file tree
Hide file tree
Showing 16 changed files with 17,418 additions and 0 deletions.
94 changes: 94 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
name: Gatsby Publish

on:
push:
branches:
- main

concurrency:
group: "pages"
cancel-in-progress: true


# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Default to bash
defaults:
run:
shell: bash

jobs:
# Build job
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Detect package manager
id: detect-package-manager
run: |
if [ -f "${{ github.workspace }}/yarn.lock" ]; then
echo "manager=yarn" >> $GITHUB_OUTPUT
echo "command=install" >> $GITHUB_OUTPUT
exit 0
elif [ -f "${{ github.workspace }}/package.json" ]; then
echo "manager=npm" >> $GITHUB_OUTPUT
echo "command=ci" >> $GITHUB_OUTPUT
exit 0
else
echo "Unable to determine package manager"
exit 1
fi
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: "18"
cache: ${{ steps.detect-package-manager.outputs.manager }}

- name: Setup Pages
id: pages
uses: actions/configure-pages@v3
with:
# Automatically inject pathPrefix in your Gatsby configuration file.
#
# You may remove this line if you want to manage the configuration yourself.
static_site_generator: gatsby

- name: Restore cache
uses: actions/cache@v3
with:
path: |
public
.cache
key: ${{ runner.os }}-gatsby-build-${{ hashFiles('public') }}
restore-keys: |
${{ runner.os }}-gatsby-build-
- name: Install dependencies
run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }}

- name: Build with Gatsby
env:
PREFIX_PATHS: 'true'
run: ${{ steps.detect-package-manager.outputs.manager }} run build

- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: ./public

# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
75 changes: 75 additions & 0 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: Validate

on:
push:
branches:
- dev
pull_request:
branches:
- dev


concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true


# Default to bash
defaults:
run:
shell: bash

jobs:
# Build job
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Detect package manager
id: detect-package-manager
run: |
if [ -f "${{ github.workspace }}/yarn.lock" ]; then
echo "manager=yarn" >> $GITHUB_OUTPUT
echo "command=install" >> $GITHUB_OUTPUT
exit 0
elif [ -f "${{ github.workspace }}/package.json" ]; then
echo "manager=npm" >> $GITHUB_OUTPUT
echo "command=ci" >> $GITHUB_OUTPUT
exit 0
else
echo "Unable to determine package manager"
exit 1
fi
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: "18"
cache: ${{ steps.detect-package-manager.outputs.manager }}
- name: Setup Pages
id: pages
uses: actions/configure-pages@v3
with:
# Automatically inject pathPrefix in your Gatsby configuration file.
#
# You may remove this line if you want to manage the configuration yourself.
static_site_generator: gatsby
- name: Restore cache
uses: actions/cache@v3
with:
path: |
public
.cache
key: ${{ runner.os }}-gatsby-build-${{ hashFiles('public') }}
restore-keys: |
${{ runner.os }}-gatsby-build-
- name: Install dependencies
run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }}
- name: Build with Gatsby
env:
PREFIX_PATHS: 'true'
run: ${{ steps.detect-package-manager.outputs.manager }} run build
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: ./public
30 changes: 30 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

node_modules

# gatsby files
.cache/
public

# Mac files
.DS_Store

# Yarn
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
# Yarn
yarn-error.log
.pnp/
.pnp.js
# Yarn Integrity file
.yarn-integrity
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v18
2 changes: 2 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
nodeLinker: node-modules

83 changes: 83 additions & 0 deletions DeveloperWebsite.code-workspace
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
{
"folders": [
{
"name": "📜 Content",
"path": "./content/page"
},
{
"name": "🌄 Static",
"path": "./static"
},
{
"name": "🏠 Root",
"path": "."
}
],
"settings": {
"window.title": "riverscapes.net GATSBY -${separator}${activeEditorShort}${separator}${rootName}",
"jest.disabledWorkspaceFolders": [
"📖 Docs",
"📱 App",
"🧬 Schema",
"🏠 Home",
],
"css.lint.validProperties": ["composes"],
"workbench.colorCustomizations": {
"titleBar.activeBackground": "#001768",
"sideBar.background": "#242132",
"editor.background": "#1e1c2c"
},
"editor.tabSize": 2,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"files.watcherExclude": {
"**/node_modules/**": true
},
"search.exclude": {
"**/node_modules/**": true,
"**/dist/**": true,
},
"files.exclude": {
"**/node_modules/**": true
}
},
"launch": {
"configurations": [
{
"type": "chrome",
"name": "Debug Using Chrome",
"request": "launch",
"url": "http://localhost:8000",
"sourceMaps": true,
"outFiles": [
"${workspaceFolder}/site/.cache/**",
"${workspaceFolder}/site/public/**",
"${workspaceFolder}/theme/**",
],
},
{
"type": "node",
"request": "launch",
"name": "Debug Gatsby Node API",
"console": "integratedTerminal",
"program": "${workspaceFolder}/node_modules/.bin/gatsby",
"runtimeExecutable": "${env:NVM_BIN}/node",
"args": ["develop"],
"sourceMaps": true,
"cwd": "${workspaceFolder}/site",
"outFiles": [
"${workspaceFolder}/site/.cache/**",
"${workspaceFolder}/site/public/**",
"${workspaceFolder}/theme/**",
],
"runtimeArgs": ["--inspect=9229"],
}
]
},
"extensions": {
"recommendations": [
"unifiedjs.vscode-mdx"
]
}
}
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Riverscapes Developer Documentation Site

TODO: INSERT INSTRUCTIONS ON USING AND DEPLOYING

- Run yarn install
- Run yarn start
Binary file added content/page/background-hero.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 4f7c451

Please sign in to comment.