Skip to content
This repository has been archived by the owner on May 4, 2024. It is now read-only.

Fix documentation and build #33

Merged
merged 1 commit into from
Sep 18, 2023
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
43 changes: 26 additions & 17 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
# use Ubuntu 22.04 & Node 18

# Seems like the documentation can not be deployed on pull requests, but only on pushes to main.
# Seems like the documentation can not be deployed for multiple branch, but only on pushes to main.
# See 5 on https://docs.github.com/en/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site#creating-a-custom-github-actions-workflow-to-publish-your-site

name: Deploy documentations
name: Build, aggregate and deploy documentations

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

jobs:
backend:
Expand Down Expand Up @@ -40,7 +42,6 @@ jobs:
name: backend-documentation
path: backend/documentation/
retention-days: 1

frontend:
name: Build frontend documentation
runs-on: ubuntu-latest
Expand Down Expand Up @@ -70,22 +71,11 @@ jobs:
name: frontend-documentation
path: frontend/styleguide/
retention-days: 1

deploy:
name: Deploy documentation
aggregate:
name: Aggregate documentation
# Set dependency on backend job
needs: [backend, frontend]

# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source

# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

runs-on: ubuntu-latest
steps:
- name: Download a single artifact
Expand All @@ -107,6 +97,25 @@ jobs:
uses: actions/upload-pages-artifact@v2
with:
path: documentation
deploy: # will deploy the website to GitHub Pages only if the push is on the dev branch
name: Deploy documentation
runs-on: ubuntu-latest
needs: [aggregate]

# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source

# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

if: github.ref == 'refs/heads/dev'

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

7 changes: 6 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
# use Ubuntu 22.04 & Node 18
name: Build & Test

on: [pull_request]
on:
pull_request:
push:
branches:
- dev
- master

jobs:
backend:
Expand Down
10 changes: 9 additions & 1 deletion frontend/styleguide.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
module.exports = {
components: ['src/App.tsx', 'src/components/**/*.{tsx,jsx,js,ts}'],
Seb-sti1 marked this conversation as resolved.
Show resolved Hide resolved
components: ['src/App.tsx', 'src/Components/**/*.{tsx,jsx,js,ts}'],
Seb-sti1 marked this conversation as resolved.
Show resolved Hide resolved
ignore: [
'**/__tests__/**',
'**/*.test.{js,jsx,ts,tsx}',
'**/*.spec.{js,jsx,ts,tsx}',
'**/*.d.ts',
'src/Components/**/constants.ts',
'src/Components/**/Hooks/*.{tsx,jsx,js,ts}',
],
};