Skip to content

Commit

Permalink
CI optimized and dependenices updated (#56)
Browse files Browse the repository at this point in the history
* ci: organizie ci in jobs

* ci: rename files to make it more consistent

* chore: update issue templates

* ci: automated tests

* chore: dependencies updated

* chore: formatting

* ci: combine steps that need pnpm

* chore: formatting

* fix: make coderabbitai happy

* ci: add preview setp

* ci: remove preview

* chore: dependencies updated

* ci: repository dispatch added for external trigger

* chore: dependencies updated

* chore: dependencies updated
  • Loading branch information
maehr authored Jan 22, 2024
1 parent 50a0a9e commit 7cd893e
Show file tree
Hide file tree
Showing 14 changed files with 513 additions and 546 deletions.
40 changes: 0 additions & 40 deletions .github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

35 changes: 35 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: 🐞 Bug
description: File a bug/issue
title: '<title>'
labels: [bug]
body:
- type: textarea
attributes:
label: Current Behavior
description: A description of what you're experiencing.
validations:
required: false
- type: textarea
attributes:
label: Reproduction / Steps To Reproduce
description: Link to a repository with steps to reproduce the behavior.
placeholder: |
As you can see in this code example/repostitory
1. Using this component...
2. With these properties...
3. Click '...'
4. See error...
validations:
required: false
- type: markdown
attributes:
value: |
Bug Reports with a repository with a full reproduction can be anwswered far quicker, so please consider including as much information as possible to let us help you quicker!
- type: textarea
attributes:
label: Anything else?
description: |
Links? References? Anything that will give us more context about the issue you are encountering!
Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in.
validations:
required: false
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
contact_links:
- name: Are you looking for documentation on stadtgeschichtebasel.ch?
url: https://github.com/Stadt-Geschichte-Basel/stadtgeschichtebasel.ch
about: Please see the documentation for stadtgeschichtebasel.ch on its GitHub Pages page.
- name: Do want to discuss stadtgeschichtebasel.ch with the community?
url: https://github.com/Stadt-Geschichte-Basel/stadtgeschichtebasel.ch/discussions
about: Please see the discussions page for stadtgeschichtebasel.ch.
blank_issues_enabled: true
23 changes: 23 additions & 0 deletions .github/ISSUE_TEMPLATE/docs_issue.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: 📗 Report Docs Issue
description: See a typo? Outdated or incorrect information? Let us know!
title: '<title>'
labels: [documentation]
body:
- type: markdown
attributes:
value: Sometimes something slips through the cracks, and the documentation is not quite right. Thanks for letting us know!
- type: input
id: link
attributes:
label: Link to the Page
- type: textarea
id: quote
attributes:
label: Describe the Issue
- type: dropdown
id: participate
attributes:
label: Are you able to create a Pull Request with the fix?
options:
- 'Yes'
- 'No'
19 changes: 0 additions & 19 deletions .github/ISSUE_TEMPLATE/feature_request.md

This file was deleted.

22 changes: 22 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: 🛠️ Request New Feature
description: Let us know what we should add.
labels: ['feature request']
body:
- type: textarea
id: description
attributes:
label: Describe what feature you'd like. Pseudo-code, mockups, or screenshots of similar solutions are encouraged!
- type: dropdown
id: category
attributes:
label: What type of pull request would this be?
options:
- 'New Feature'
- 'Enhancement'
- 'Guide'
- 'Docs'
- 'Other'
- type: textarea
id: references
attributes:
label: Any links to similar examples or other references we should review?
40 changes: 0 additions & 40 deletions .github/ISSUE_TEMPLATE/vulnerability_report.md

This file was deleted.

File renamed without changes.
67 changes: 31 additions & 36 deletions .github/workflows/sveltekitci.yml
Original file line number Diff line number Diff line change
@@ -1,89 +1,84 @@
name: SvelteKit CI

on:
schedule:
- cron: '0 0 * * *'
pull_request:
branches:
- main
push:
branches:
- main
workflow_dispatch:

schedule:
- cron: 0 0 * * *
workflow_dispatch: null
repository_dispatch:
jobs:
ci:
build:
runs-on: ubuntu-latest

permissions:
contents: read
deployments: write

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

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 'latest'

node-version: 21
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8
run_install: false

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- name: Setup pnpm cache
uses: actions/cache@v3
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
path: '${{ env.STORE_PATH }}'
key: "${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}"
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install
- name: Install playwright
run: pnpm exec playwright install
- name: Lint
run: pnpm run lint
- name: Setup jampack cache
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
uses: actions/cache@v3
with:
path: '.jampack'
path: .jampack
key: jampack
restore-keys: |
jampack
- name: Install dependencies
run: pnpm install

- name: Install playwright
run: pnpm exec playwright install

- name: Lint
run: pnpm run lint

- name: Prebuild
run: pnpm run prebuild

- name: Build
run: pnpm run build

- name: Postbuild
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
run: pnpm run postbuild

- name: Test
run: pnpm run test

deploy:
needs: build
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: '${{ steps.deployment.outputs.page_url }}'
steps:
- name: Publish to Cloudflare Pages
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main' && github.repository == 'Stadt-Geschichte-Basel/stadtgeschichtebasel.ch'
if: >-
github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
&& github.repository ==
'Stadt-Geschichte-Basel/stadtgeschichtebasel.ch'
uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
apiToken: '${{ secrets.CLOUDFLARE_API_TOKEN }}'
accountId: '${{ secrets.CLOUDFLARE_ACCOUNT_ID }}'
projectName: stadtgeschichtebasel-ch
directory: build
# Optional: Enable this if you want to have GitHub Deployments triggered
Expand Down
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,12 @@ pnpm run format

This project is maintained by [@Stadt-Geschichte-Basel](https://github.com/Stadt-Geschichte-Basel). Please understand that we won't be able to provide individual support via email. We also believe that help is much more valuable if it's shared publicly, so that more people can benefit from it.

| Type | Platforms |
| -------------------------------------- | ------------------------------------------------------------------------------------------------ |
| 🚨 **Bug Reports** | [GitHub Issue Tracker](https://github.com/Stadt-Geschichte-Basel/stadtgeschichtebasel.ch/issues) |
| 🎁 **Feature Requests** | [GitHub Issue Tracker](https://github.com/Stadt-Geschichte-Basel/stadtgeschichtebasel.ch/issues) |
| 🛡 **Report a security vulnerability** | [GitHub Issue Tracker](https://github.com/Stadt-Geschichte-Basel/stadtgeschichtebasel.ch/issues) |
| Type | Platforms |
| -------------------------------------- | --------------------------------------------------------------------------------------------------- |
| 🚨 **Bug Reports** | [GitHub Issue Tracker](https://github.com/Stadt-Geschichte-Basel/stadtgeschichtebasel.ch/issues) |
| 🎁 **Feature Requests** | [GitHub Issue Tracker](https://github.com/Stadt-Geschichte-Basel/stadtgeschichtebasel.ch/issues) |
| 🛡 **Report a security vulnerability** | [GitHub Issue Tracker](https://github.com/Stadt-Geschichte-Basel/stadtgeschichtebasel.ch/issues) |
| 💬 **General Questions** | [GitHub Discussions](https://github.com/Stadt-Geschichte-Basel/stadtgeschichtebasel.ch/discussions) |

## Contributing

Expand Down
22 changes: 11 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,42 +28,42 @@
},
"devDependencies": {
"@divriots/jampack": "^0.23.2",
"@playwright/test": "^1.40.1",
"@skeletonlabs/skeleton": "^2.7.0",
"@playwright/test": "^1.41.1",
"@skeletonlabs/skeleton": "^2.7.1",
"@skeletonlabs/tw-plugin": "^0.3.1",
"@sveltejs/adapter-static": "^3.0.1",
"@sveltejs/kit": "^2.1.2",
"@sveltejs/kit": "^2.4.1",
"@sveltejs/vite-plugin-svelte": "^3.0.1",
"@tailwindcss/typography": "^0.5.10",
"autoprefixer": "^10.4.16",
"autoprefixer": "^10.4.17",
"cheerio": "1.0.0-rc.12",
"dompurify": "^3.0.8",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-svelte": "^2.35.1",
"husky": "^8.0.3",
"js-yaml": "^4.1.0",
"jsdom": "^23.2.0",
"jsdom": "^24.0.0",
"mdsvex": "^0.11.0",
"node-fetch": "^3.3.2",
"postcss": "^8.4.33",
"prettier": "^3.1.1",
"prettier": "^3.2.4",
"prettier-plugin-svelte": "^3.1.2",
"prettier-plugin-tailwindcss": "^0.5.11",
"rehype-autolink-headings": "^7.1.0",
"rehype-external-links": "^3.0.0",
"rehype-slug": "^6.0.0",
"remark-captions": "^2.2.3",
"svelte": "^4.2.8",
"svelte-check": "^3.6.2",
"svelte-maplibre": "^0.7.5",
"svelte": "^4.2.9",
"svelte-check": "^3.6.3",
"svelte-maplibre": "^0.7.6",
"svelte-sitemap": "^2.6.0",
"tailwindcss": "^3.4.1",
"turndown": "^7.1.2",
"typescript": "^5.3.3",
"vite": "^5.0.11",
"vite": "^5.0.12",
"vite-plugin-tailwind-purgecss": "^0.2.0",
"vitest": "^1.1.3",
"vitest": "^1.2.1",
"xml2js": "^0.6.2"
},
"type": "module"
Expand Down
Loading

0 comments on commit 7cd893e

Please sign in to comment.