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

feat(beta): header + footer #1023

Merged
merged 8 commits into from
Aug 3, 2023
Merged
Show file tree
Hide file tree
Changes from 5 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
92 changes: 46 additions & 46 deletions .github/workflows/github-stats.yml
arnaudambro marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -1,46 +1,46 @@
name: Github Stats

on:
workflow_dispatch:
schedule:
- cron: "42 23 * * 1"

jobs:
udpate:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
token: ${{ secrets.SOCIALGROOVYBOT_BOTO_PAT }}

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- name: Get yarn cache
uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-

- name: Install
run: yarn --frozen-lockfile --perfer-offline

- name: Download stats
run: yarn github-stats
env:
GITHUB_TOKEN: ${{ secrets.GH_API_TOKEN }}

- name: Check stats validity
run: |
cat ./public/github-stats.json | jq .

- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "fix: Update Github stats."
commit_author: "GitHub bot <[email protected]>"
# name: Github Stats

# on:
# workflow_dispatch:
# schedule:
# - cron: "42 23 * * 1"

# jobs:
# udpate:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout repository
# uses: actions/checkout@v2
# with:
# token: ${{ secrets.SOCIALGROOVYBOT_BOTO_PAT }}

# - name: Get yarn cache directory path
# id: yarn-cache-dir-path
# run: echo "::set-output name=dir::$(yarn cache dir)"

# - name: Get yarn cache
# uses: actions/cache@v2
# id: yarn-cache
# with:
# path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
# key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
# restore-keys: |
# ${{ runner.os }}-yarn-

# - name: Install
# run: yarn --frozen-lockfile --perfer-offline

# - name: Download stats
# run: yarn github-stats
# env:
# GITHUB_TOKEN: ${{ secrets.GH_API_TOKEN }}

# - name: Check stats validity
# run: |
# cat ./public/github-stats.json | jq .

# - name: Commit changes
# uses: stefanzweifel/git-auto-commit-action@v4
# with:
# commit_message: "fix: Update Github stats."
# commit_author: "GitHub bot <[email protected]>"
56 changes: 28 additions & 28 deletions .github/workflows/tests.yml
arnaudambro marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
name: Tests
# name: Tests
gary-van-woerkens marked this conversation as resolved.
Show resolved Hide resolved

on:
pull_request:
branches:
- '**'
# on:
# pull_request:
# branches:
# - '**'

concurrency:
cancel-in-progress: true
group: ${{ github.head_ref }}
# concurrency:
# cancel-in-progress: true
# group: ${{ github.head_ref }}

jobs:
# jobs:

##############################################################################
## TEST APPLICATION
##############################################################################
test:
name: Test application
runs-on: ubuntu-latest
steps:
# ##############################################################################
# ## TEST APPLICATION
# ##############################################################################
# test:
# name: Test application
# runs-on: ubuntu-latest
# steps:

- name: Checkout repository
uses: actions/checkout@v2
# - name: Checkout repository
# uses: actions/checkout@v2

- name: Node setup
uses: actions/setup-node@v2
with:
node-version: '18'
# - name: Node setup
# uses: actions/setup-node@v2
# with:
# node-version: '18'

- name: Yarn cache setup
uses: c-hive/gha-yarn-cache@v2
# - name: Yarn cache setup
# uses: c-hive/gha-yarn-cache@v2

- name: Install dependencies
run: yarn --frozen-lockfile --prefer-offline
# - name: Install dependencies
# run: yarn --frozen-lockfile --prefer-offline

- name: Run tests
run: yarn test --coverage
# - name: Run tests
# run: yarn test --coverage
11 changes: 9 additions & 2 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
output: "standalone",
}
webpack: (config) => {
config.module.rules.push({
test: /\.woff2$/,
type: "asset/resource",
});
return config;
},
};

module.exports = nextConfig
module.exports = nextConfig;
14 changes: 10 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,25 @@
"build": "next build",
"start": "next start",
"lint": "next lint",
"test": "echo 'no tests'"
"test": "echo 'no tests'",
"predev": "only-include-used-icons",
"prebuild": "only-include-used-icons"
},
"dependencies": {
"@codegouvfr/react-dsfr": "0.73.2",
"next": "13.4.12",
"react": "18.2.0",
"react-dom": "18.2.0"
},
"devDependencies": {
"@types/node": "20.4.5",
"@types/react": "18.2.17",
"@types/react-dom": "18.2.7",
"autoprefixer": "10.4.14",
"eslint": "8.45.0",
"eslint-config-next": "13.4.12",
"next": "13.4.12",
"postcss": "8.4.27",
"react": "18.2.0",
"react-dom": "18.2.0",
"sass": "1.64.2",
"tailwindcss": "3.3.3",
"typescript": "5.1.6"
}
Expand Down
18 changes: 18 additions & 0 deletions src/app/StartDsfr.tsx
gary-van-woerkens marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
"use client";

import { startReactDsfr } from "@codegouvfr/react-dsfr/next-appdir";
import { defaultColorScheme } from "./defaultColorScheme";
import Link from "next/link";

declare module "@codegouvfr/react-dsfr/next-appdir" {
interface RegisterLink {
Link: typeof Link;
}
}

startReactDsfr({ defaultColorScheme, Link });

export function StartDsfr() {
//Yes, leave null here.
return null;
}
Loading