Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploy to Development workflow #47

Merged
merged 1 commit into from
Feb 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions .github/workflows/deploy-dev.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Deploy to Dev

# Builds our artifact and deploy to GitHub Pages which we are using as our
# development environment.

on:
push:
branches:
- main

permissions:
contents: read
pages: write
id-token: write

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

jobs:
deploy:
if: github.repository == 'usepa/the-manifest-game'
name: Deploy to Development
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Build project
run: npm run build -- --base=/${{ github.event.repository.name }}/

- name: Setup Pages
uses: actions/configure-pages@v3

- name: Upload Docs
uses: actions/upload-pages-artifact@v3
with:
path: ./build

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

10 changes: 5 additions & 5 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@ jobs:
matrix:
node-version: [ 20 ]
steps:
- name: 'Checkout'
uses: actions/checkout@v3
- name: Checkout
uses: actions/checkout@v4

- name: 'Setup Node'
uses: actions/setup-node@v3
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'

- name: 'Install Dependencies'
- name: Install Dependencies
run: npm ci

- name: Test Node.js-${{ matrix.node-version }}
Expand Down
7 changes: 2 additions & 5 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import defaultTree from '/default.json?url';
import { ErrorMsg } from 'components/Error';
import { Header } from 'components/Header/Header';
import { Spinner } from 'components/Spinner/Spinner';
Expand All @@ -13,11 +14,7 @@ import { useState } from 'react';
*/
export default function App() {
const title = import.meta.env.VITE_APP_TITLE ?? 'The Manifest Game';
const {
config,
isLoading: configIsLoading,
error: configError,
} = useFetchConfig('/default.json');
const { config, isLoading: configIsLoading, error: configError } = useFetchConfig(defaultTree);
const [direction, setDirection] = useTreeDirection();
const { nodes, edges, onClick } = useDecisionTree(config);
const [mapVisible, setMapVisible] = useState(true);
Expand Down
Loading