Skip to content

Commit

Permalink
Update GH actions and lint/format
Browse files Browse the repository at this point in the history
  • Loading branch information
tyom committed Oct 3, 2023
1 parent be05aeb commit 1258af6
Show file tree
Hide file tree
Showing 9 changed files with 40 additions and 22 deletions.
17 changes: 11 additions & 6 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,21 @@ jobs:
name: build and test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16'
node-version: 16

- uses: pnpm/action-setup@v2
name: Install pnpm
with:
version: 8

- name: Install dependencies
run: yarn install --frozen-lockfile
run: pnpm install

- name: Lint source
run: yarn lint
run: pnpm lint

- name: Build app and generate PDF
run: yarn predeploy
run: pnpm predeploy
22 changes: 15 additions & 7 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,26 @@ jobs:
name: build and deploys
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16'
node-version: 16

- uses: pnpm/action-setup@v2
name: Install pnpm
with:
version: 8

- name: Install dependencies
run: yarn install --frozen-lockfile
run: pnpm install

- name: Lint source
run: pnpm lint

- name: Build app and Storybook and prepare for deployment
run: yarn predeploy
- name: Build app and generate PDF
run: pnpm predeploy
env:
GA_TRACKING_ID: UA-332655-6
PUBLIC_GA_MEASUREMENT_ID: G-T41297TYQ1

- name: Deploy to GH Pages
uses: peaceiris/actions-gh-pages@v3
Expand Down
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ build/**
node_modules/**
dist/
storybook-static/
pnpm-lock.yaml
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ The static site is deployed to GH Pages. To deploy manually (this also runs pred

## Environment variables

| Variable | Description |
|:-------------------------|:-----------------------------------------|
| GIT_USER_EMAIL | Git user email for pushing to GH pages |
| GIT_USER_NAME | Git user name for pushing to GH pages |
| PUBLIC_GA_MEASUREMENT_ID | Google Analytics measuremet ID |
| Variable | Description |
| :----------------------- | :------------------------------------- |
| GIT_USER_EMAIL | Git user email for pushing to GH pages |
| GIT_USER_NAME | Git user name for pushing to GH pages |
| PUBLIC_GA_MEASUREMENT_ID | Google Analytics measuremet ID |
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"build": "vite build",
"start": "vite preview",
"create-pdf": "node scripts/create-pdf.cjs",
"predeploy": "rm -rf build && yarn create-pdf && yarn build && yarn build-storybook && cp -a storybook-static/. build/storybook && echo tyom.semonov.com > build/CNAME",
"predeploy": "rm -rf build && pnpm create-pdf && pnpm build && pnpm build-storybook && cp -a storybook-static/. build/storybook && echo tyom.semonov.com > build/CNAME",
"deploy": "gh-pages -d build --dotfiles",
"lint": "eslint --ignore-path .gitignore . && prettier --check .",
"format": "prettier --write .",
Expand Down
3 changes: 1 addition & 2 deletions src/app.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
href="https://fonts.googleapis.com/css?family=Roboto:400,700"
rel="stylesheet"
/>
%sveltekit.head%
%unocss-svelte-scoped.global%
%sveltekit.head% %unocss-svelte-scoped.global%
</head>
<body>
<div id="container">%sveltekit.body%</div>
Expand Down
1 change: 1 addition & 0 deletions src/components/ExperienceItem.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
</header>
{#if description}
<div class="description">
<!-- eslint-disable-next-line svelte/no-at-html-tags -->
{@html description}
</div>
{/if}
Expand Down
2 changes: 2 additions & 0 deletions src/components/Summary.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
<h1 class="font-bold tracking-wide leading-none text-[2.9em]">{name}</h1>
<h2 class="leading-none opacity-60 text-[1.4em]">{title}</h2>
<div class="max-w-[68ch] leading-snug">
<!-- eslint-disable-next-line svelte/no-at-html-tags -->
{@html details}
</div>
<section class="divided">
Expand Down Expand Up @@ -93,6 +94,7 @@
<div class="space-y-1">
<dt class="sr-only">{type}</dt>
<dd>
<!-- eslint-disable-next-line svelte/no-at-html-tags -->
{@html details}
</dd>
</div>
Expand Down
4 changes: 3 additions & 1 deletion svelte.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ export default {
}),
],
kit: {
adapter: staticAdapter(),
adapter: staticAdapter({
fallback: 'index.html',
}),
alias: {
$data: 'data',
$src: 'src',
Expand Down

0 comments on commit 1258af6

Please sign in to comment.