Skip to content

Commit

Permalink
Add deployment workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
hstandaert committed Mar 22, 2024
1 parent 6639d93 commit a182090
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 7 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Deploy static content to Pages

on:
push:
branches: ["main"]

workflow_dispatch:

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

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

jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up pnpm
uses: pnpm/action-setup@v3
with:
version: 8

- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"

- name: Install dependencies
run: pnpm install

- name: Build
run: pnpm run build

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

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
# Upload dist folder
path: "./dist"

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
2 changes: 1 addition & 1 deletion src/components/Navigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function Navigation() {
{isCompliant ? (
<>
<span className="sr-only">Icapps</span>
<IcappsLogo title="Icapps logo" aria-hidden />
<IcappsLogo aria-hidden />
</>
) : (
<IcappsLogo title="" />
Expand Down
7 changes: 1 addition & 6 deletions src/providers/AppStateProvider.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
import { useLocalStorage } from "@/hooks";
import {
type PropsWithChildren,
createContext,
useContext,
useState,
} from "react";
import { type PropsWithChildren, createContext, useContext } from "react";

export type AppStateContext = {
isCompliant: boolean;
Expand Down
1 change: 1 addition & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { defineConfig } from "vite";

// https://vitejs.dev/config/
export default defineConfig({
base: "/e-inclusion-demo/",
plugins: [react()],
resolve: {
alias: {
Expand Down

0 comments on commit a182090

Please sign in to comment.