Compare commits

..

No commits in common. "3111452adb9aac735fe8cdcc861a60612e963da5" and "e87492735036fb255cb81bc99075b8f341128ec8" have entirely different histories.

16 changed files with 2901 additions and 3695 deletions

19
.github/scripts/update-changelog.js vendored Normal file
View file

@ -0,0 +1,19 @@
const fs = require('fs');
module.exports = (version, prUrl) => {
const changelog = fs.readFileSync('CHANGELOG.md', 'utf8');
const changelogLines = changelog.split('\n');
const lastChangeIndex = changelogLines.findIndex((line) => line.startsWith('## ['));
const textToAppend = `
## [${version}] - ${new Date().toISOString().split('T')[0]}
### Dependencies
- chore(deps): update dependencies ([details](${prUrl}))
`.trim();
changelogLines.splice(lastChangeIndex, 0, textToAppend + '\n');
fs.writeFileSync('CHANGELOG.md', changelogLines.join('\n'));
};

View file

@ -0,0 +1,16 @@
name: Create Issue Branch
on:
issues:
types: [assigned]
pull_request:
types: [closed]
jobs:
create_issue_branch_job:
runs-on: ubuntu-latest
steps:
- name: Create Issue Branch
uses: robvanderleek/create-issue-branch@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View file

@ -0,0 +1,40 @@
name: Modify changelog for dependency updates
on:
pull_request:
types: [labeled]
jobs:
build:
if: github.event.label.name == 'dependencies' && github.repository == 'KonradSzwarc/devscard'
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
- name: Get project information
id: projectinfo
uses: gregoranders/nodejs-project-info@v0.0.19
- name: Get next possible versions
id: semvers
uses: WyriHaximus/github-action-next-semvers@v1
with:
version: ${{ steps.projectinfo.outputs.version }}
- name: Update package.json version
uses: reedyuk/npm-version@1.1.1
with:
version: ${{ steps.semvers.outputs.patch }}
- name: Update CHANGELOG.md
uses: actions/github-script@v6
with:
script: |
const script = require('.github/scripts/update-changelog.js');
const version = '${{ steps.semvers.outputs.patch }}';
const prUrl = '${{ github.event.pull_request.url }}';
script(version, prUrl);
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v4

136
.github/workflows/main-branch.yml vendored Normal file
View file

@ -0,0 +1,136 @@
name: Main Branch
on:
push:
branches: [main]
jobs:
prettier:
name: Run Prettier check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
cache: npm
- name: Install dependencies
run: npm ci
- name: Run Prettier
run: npm run prettier:check
typescript:
name: Run TypeScript check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
cache: npm
- name: Install dependencies
run: npm ci
- name: Run TypeScript types check
run: npm run ts:check
astro:
name: Run Astro check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
cache: npm
- name: Install dependencies
run: npm ci
- name: Run Astro check
run: npm run astro:check
deploy:
name: Deploy to Netlify
needs: [prettier, typescript, astro]
if: github.repository == 'KonradSzwarc/devscard'
runs-on: ubuntu-latest
outputs:
deploy-url: ${{ steps.netlify.outputs.deploy-url }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
cache: npm
- name: Install dependencies
run: npm ci
- name: Run Astro build command
run: npm run build
- name: Deploy to Netlify
id: netlify
uses: nwtgck/actions-netlify@v2
with:
publish-dir: dist
production-branch: main
github-token: ${{ secrets.GITHUB_TOKEN }}
production-deploy: true
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
timeout-minutes: 1
percy:
name: Run Percy check
if: github.repository == 'KonradSzwarc/devscard'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
cache: npm
- name: Install dependencies
run: npm ci
- name: Run Astro build command
run: npm run build
env:
PUBLIC_APP_ENV: snapshot
- name: Percy check
env:
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}
run: npx percy snapshot dist/
lighthouse:
name: Run Lighthouse check
if: github.repository == 'KonradSzwarc/devscard'
needs: deploy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Lighthouse check
uses: foo-software/lighthouse-check-action@master
with:
urls: ${{ needs.deploy.outputs.deploy-url }}
device: all
release:
name: Create release
if: github.repository == 'KonradSzwarc/devscard'
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- name: Get project information
id: projectinfo
uses: gregoranders/nodejs-project-info@v0.0.19
- name: Get changelog entries
id: changelog_reader
uses: mindsers/changelog-reader-action@v2
with:
version: ${{ steps.projectinfo.outputs.version }}
- name: Create a new tag and release
uses: ncipollo/release-action@v1
with:
tag: ${{ steps.changelog_reader.outputs.version }}
name: Release ${{ steps.changelog_reader.outputs.version }}
body: ${{ steps.changelog_reader.outputs.changes }}
allowUpdates: true

188
.github/workflows/pull-request.yml vendored Normal file
View file

@ -0,0 +1,188 @@
name: Pull Request
on:
pull_request:
branches: [main]
types: [opened, edited, synchronize]
jobs:
lint-title:
name: Validate PR title
if: github.repository == 'KonradSzwarc/devscard'
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
requireScope: false
version:
name: Check package.json version
if: github.repository == 'KonradSzwarc/devscard'
runs-on: ubuntu-latest
steps:
- name: Checkout PR branch
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Get project information
id: projectinfo-current
uses: gregoranders/nodejs-project-info@v0.0.19
- name: Checkout main branch
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.base.sha }}
- name: Get project information
id: projectinfo-main
uses: gregoranders/nodejs-project-info@v0.0.19
- name: Get next possible versions
id: semvers
uses: WyriHaximus/github-action-next-semvers@v1
with:
version: ${{ steps.projectinfo-main.outputs.version }}
- name: Assert correct version bump
uses: nick-fields/assert-action@v1
with:
expected: ${{ steps.projectinfo-current.outputs.version }}
actual: 'Possible version bumps: ${{ steps.semvers.outputs.patch }}, ${{ steps.semvers.outputs.minor }}, ${{ steps.semvers.outputs.major }}'
comparison: contains
changelog:
name: Check changelog
if: github.repository == 'KonradSzwarc/devscard'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- name: Get project information
id: projectinfo
uses: gregoranders/nodejs-project-info@v0.0.19
- name: Enforce changelog update
uses: dangoslen/changelog-enforcer@v3
with:
expectedLatestVersion: ${{ steps.projectinfo.outputs.version }}
- name: Get changelog entries
id: changelog_reader
uses: mindsers/changelog-reader-action@v2
with:
version: ${{ steps.projectinfo.outputs.version }}
- name: Assert correct changelog version
uses: nick-fields/assert-action@v1
with:
expected: ${{ steps.projectinfo.outputs.version }}
actual: ${{ steps.changelog_reader.outputs.version }}
prettier:
name: Run Prettier check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
cache: npm
- name: Install dependencies
run: npm ci
- name: Run Prettier
run: npm run prettier:check
typescript:
name: Run TypeScript check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
cache: npm
- name: Install dependencies
run: npm ci
- name: Run TypeScript types check
run: npm run ts:check
astro:
name: Run Astro check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
cache: npm
- name: Install dependencies
run: npm ci
- name: Run Astro check
run: npm run astro:check
percy:
name: Run Percy check
if: github.repository == 'KonradSzwarc/devscard'
needs: [prettier, typescript, astro, lint-title, version, changelog]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
cache: npm
- name: Install dependencies
run: npm ci
- name: Run Astro build command
run: npm run build
env:
PUBLIC_APP_ENV: snapshot
- name: Percy check
env:
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}
run: npx percy snapshot dist/
preview:
name: Create deploy preview
needs: [prettier, typescript, astro, lint-title, version, changelog]
if: github.repository == 'KonradSzwarc/devscard'
runs-on: ubuntu-latest
outputs:
deploy-url: ${{ steps.netlify.outputs.deploy-url }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
cache: npm
- name: Install dependencies
run: npm ci
- name: Run Astro build command
run: npm run build
- name: Deploy to Netlify
id: netlify
uses: nwtgck/actions-netlify@v2
with:
publish-dir: dist
production-branch: main
github-token: ${{ secrets.GITHUB_TOKEN }}
alias: deploy-preview-${{ github.event.number }}
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
timeout-minutes: 1
lighthouse:
name: Run Lighthouse check
if: github.repository == 'KonradSzwarc/devscard'
needs: preview
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Lighthouse check
uses: foo-software/lighthouse-check-action@master
with:
urls: ${{ needs.preview.outputs.deploy-url }}
gitAuthor: ${{ github.actor }}
gitBranch: ${{ github.ref }}
gitHubAccessToken: ${{ secrets.GITHUB_TOKEN }}
device: all
prCommentEnabled: true
prCommentSaveOld: false

View file

@ -1,50 +0,0 @@
name: Run Checks
on:
pull_request:
branches: [main]
push:
branches: [main]
jobs:
prettier:
name: Run Prettier check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
cache: npm
- name: Install dependencies
run: npm ci
- name: Run Prettier
run: npm run prettier:check
typescript:
name: Run TypeScript check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
cache: npm
- name: Install dependencies
run: npm ci
- name: Run TypeScript types check
run: npm run ts:check
astro:
name: Run Astro check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
cache: npm
- name: Install dependencies
run: npm ci
- name: Run Astro check
run: npm run astro:check

View file

@ -2,63 +2,17 @@
All notable changes to this project will be documented in this file.
## [0.3.0] - 2023-08-25
### Breaking
- Bump astro-compress version to prevent failing install
## [0.2.1] - 2023-07-10
### Dependencies
- chore(deps): update dependencies ([details](https://github.com/KonradSzwarc/devscard/pull/226))
## [0.2.0] - 2023-07-02
### Breaking
- Require Node.js 18.
### Dependencies
- chore(deps): update dependencies ([details](https://github.com/KonradSzwarc/devscard/pull/225))
## [0.1.6] - 2023-05-08
### Dependencies
- chore(deps): update dependencies ([details](https://github.com/KonradSzwarc/devscard/pull/220))
## [0.1.5] - 2023-05-01
### Dependencies
- chore(deps): update dependencies ([details](https://github.com/KonradSzwarc/devscard/pull/219))
## [0.1.4] - 2023-04-05
### Workflow
- ci: use pull request URL instead of its API endpoint when generating changelog for dependency updates.
## [0.1.3] - 2023-03-27
### Dependencies
- chore(deps): update dependencies ([details](https://github.com/KonradSzwarc/devscard/pull/214))
## [0.1.2] - 2023-03-24
### Dependencies
- chore(deps): update dependencies ([details](https://github.com/KonradSzwarc/devscard/pull/212))
- chore(deps): update dependencies ([details](https://api.github.com/repos/KonradSzwarc/devscard/pulls/212))
## [0.1.1] - 2023-03-20
### Dependencies
- chore(deps): update dependencies ([details](https://github.com/KonradSzwarc/devscard/pull/213))
- chore(deps): update dependencies ([details](https://api.github.com/repos/KonradSzwarc/devscard/pulls/213))
## [0.1.0] - 2023-03-13
@ -70,13 +24,13 @@ All notable changes to this project will be documented in this file.
### Dependencies
- chore(deps): update dependencies ([details](https://github.com/KonradSzwarc/devscard/pull/209))
- chore(deps): update dependencies ([details](https://api.github.com/repos/KonradSzwarc/devscard/pulls/209))
## [0.0.5] - 2023-02-27
### Dependencies
- chore(deps): update dependencies ([details](https://github.com/KonradSzwarc/devscard/pull/207))
- chore(deps): update dependencies ([details](https://api.github.com/repos/KonradSzwarc/devscard/pulls/207))
## [0.0.4] - 2023-02-22

View file

@ -2,11 +2,6 @@
A fully customizable template to create your online (and paper) resume without writing a single line of code.
> [!IMPORTANT]
> This project will remain available but <ins>**won't receive updates**</ins>.
>
> If you are searching for a great framework to build your resume, **[check out Zenith](https://github.com/KonradSzwarc/zenith)**. It's a new iteration of this project utilizing recent Astro version capabilities that will provide you with much more features and customizability.
## Features
- **✍️ Intellisense** — provide your data in TypeScript files, getting autocompletion and description of each property right in your IDE.
@ -31,4 +26,4 @@ To learn how to set up your resume, go to:
To see an example CV, visit the link below:
[devscard-resume.pages.dev](https://devscard-resume.pages.dev)
[https://devscard.netlify.app](https://devscard.netlify.app/)

View file

@ -11,5 +11,5 @@
## External links
- [Example resume](https://devscard-resume.pages.dev)
- [Example resume](https://devscard.netlify.app)
- [GitHub repository](https://github.com/KonradSzwarc/devscard)

6009
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -1,11 +1,11 @@
{
"name": "devscard",
"description": "Template for creating a comprehensive virtual CV for developers.",
"version": "0.3.0",
"version": "0.1.2",
"private": true,
"engines": {
"node": ">=18",
"npm": ">=9",
"node": ">=14",
"npm": ">=6",
"yarn": "please-use-npm",
"pnpm": "please-use-npm"
},
@ -25,38 +25,38 @@
"check": "concurrently npm:*:check"
},
"dependencies": {
"@floating-ui/dom": "1.4.4",
"iconify-icon": "1.0.8",
"nanoid": "4.0.2"
"@floating-ui/dom": "1.2.5",
"iconify-icon": "1.0.7",
"nanoid": "4.0.1"
},
"devDependencies": {
"@astrojs/image": "0.17.2",
"@astrojs/react": "2.2.1",
"@astrojs/tailwind": "4.0.0",
"@percy/cli": "1.26.2",
"@types/marked": "5.0.0",
"astro": "2.8.0",
"astro-compress": "2.0.14",
"concurrently": "8.2.0",
"date-fns": "2.30.0",
"favicons": "7.1.3",
"@astrojs/image": "0.16.1",
"@astrojs/react": "2.1.0",
"@astrojs/tailwind": "3.1.1",
"@percy/cli": "1.21.0",
"@types/marked": "4.0.8",
"astro": "2.1.3",
"astro-compress": "1.1.35",
"concurrently": "7.6.0",
"date-fns": "2.29.3",
"favicons": "7.1.1",
"iconify-icon-names": "1.1.0",
"immer": "10.0.2",
"immer": "9.0.19",
"locales-ts": "1.0.0",
"marked": "5.1.1",
"marked": "4.2.12",
"move-file-cli": "3.0.0",
"photoswipe": "5.3.8",
"postcss": "8.4.25",
"prettier": "2.8.8",
"prettier-plugin-astro": "0.10.0",
"prettier-plugin-tailwindcss": "0.3.0",
"puppeteer": "20.8.0",
"photoswipe": "5.3.6",
"postcss": "8.4.21",
"prettier": "2.8.4",
"prettier-plugin-astro": "0.8.0",
"prettier-plugin-tailwindcss": "0.2.5",
"puppeteer": "19.7.5",
"puppeteer-report": "3.1.0",
"rollup-plugin-visualizer": "5.9.2",
"tailwindcss": "3.3.2",
"rollup-plugin-visualizer": "5.9.0",
"tailwindcss": "3.2.7",
"ts-node": "10.9.1",
"type-fest": "3.13.0",
"typescript": "5.1.6"
"type-fest": "3.6.1",
"typescript": "5.0.2"
},
"repository": {
"type": "git",

View file

@ -32,7 +32,7 @@ const retry = async ({ promise, retries, retryTime }: RetryOptions): GoToReturn
const main = async () => {
const child = exec('npm run dev');
const browser = await puppeteer.launch({ headless: 'new' });
const browser = await puppeteer.launch({ headless: true });
const page = await browser.newPage();

View file

@ -24,17 +24,10 @@ const stripIndent = (str: string) => {
return str.replace(regex, '');
};
const parseMarkdown = (str: string) =>
marked.parse(stripIndent(str), {
breaks: true,
headerIds: false,
mangle: false,
});
const { content, classList } = Astro.props;
---
<div set:html={parseMarkdown(content)} class:list={['description', ...classList]} />
<div set:html={marked.parse(stripIndent(content), { breaks: true })} class:list={['description', ...classList]} />
<style is:global>
.description ul {

View file

@ -1,5 +1,5 @@
import type { Data } from '@/types/data';
import { produce } from 'immer';
import produce from 'immer';
import type { PreciseData } from './get-cv-data';
import type { DataTransformer } from './transformers';

View file

@ -1,4 +1,4 @@
<div class="flex items-center gap-4 pb-5 pt-10">
<div class="flex items-center gap-4 pt-10 pb-5">
<div class="whitespace-nowrap text-2xl font-extrabold text-gray-900"><slot /></div>
<hr class="w-full bg-gray-300" />
</div>

View file

@ -20,7 +20,7 @@ const { config, skillSets } = Astro.props;
return (
<div class="flex h-6 w-fit overflow-hidden rounded">
<div class="flex items-center bg-gray-100 pl-2.5 pr-2 font-medium">{skill.name}</div>
<div class="flex items-center bg-gray-200 pl-2 pr-2.5 font-normal">{skill.level}/5</div>
<div class="flex items-center bg-gray-200 pr-2.5 pl-2 font-normal">{skill.level}/5</div>
</div>
);
}
@ -31,7 +31,7 @@ const { config, skillSets } = Astro.props;
<div class="flex items-center bg-gray-100 pl-2.5 pr-2 font-medium">
{skill.name.split(' - ')[0]}
</div>
<div class="flex items-center bg-gray-200 pl-2 pr-2.5 font-normal">
<div class="flex items-center bg-gray-200 pr-2.5 pl-2 font-normal">
{skill.name.split(' - ')[1]}
</div>
</div>