Skip to content

Commit 092f961

Browse files
committed
Merge branch 'main' into npm-publishing
* main: Update directory paths for GitHub Pages (#27) WEBDEV-8141: Github Pages (#25) v0.1.0 (#26) WEBDEV-8109 Expand status indicator capabilities (#23) WEBDEV-8100 Encapsulate style settings (#22) Load snowflakes async (#12) WEBDEV-8019 Add basic loading indicator (#17) Fix issue with css property values not updating (#19) WEBDEV-8098: Component Demo Light Mode (#18) WEBDEV-8037 Create CSS theme structure (#16)
2 parents a82f8a2 + bd89dc0 commit 092f961

23 files changed

+1175
-144
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# This workflow will generate the static page under `main` subdirectory inside the `ghpages` branch
2+
3+
# This workflow will run every time new changes were pushed to the `main` branch
4+
5+
name: App build CI/CD to main branch
6+
permissions:
7+
contents: write
8+
9+
on:
10+
push:
11+
branches: [ main ]
12+
13+
jobs:
14+
build-and-deploy:
15+
concurrency: ci-${{ github.ref }}
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout 🛎️
19+
uses: actions/checkout@v6
20+
with:
21+
persist-credentials: false
22+
23+
- name: Set up Git
24+
run: |
25+
git config --global user.name "Github Actions"
26+
git config --global user.email "actions@github.com"
27+
28+
- name: Install and Build 🔧
29+
run: |
30+
npm ci
31+
npm run ghpages:build
32+
33+
- name: Deploy 🚀
34+
uses: JamesIves/github-pages-deploy-action@v4
35+
with:
36+
branch: ghpages
37+
folder: ghpages
38+
clean-exclude: pr/
39+
force: false

.github/workflows/pr-preview.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# This workflow will generate the static page under `pr` subdirectory inside the `ghpages` branch
2+
3+
# This workflow will run every time there's a PR opened, reopened, synchronize, or closed
4+
5+
name: Deploy PR previews
6+
7+
on:
8+
pull_request:
9+
types:
10+
- opened
11+
- reopened
12+
- synchronize
13+
- closed
14+
15+
concurrency: preview-${{ github.ref }}
16+
17+
env:
18+
PREVIEW_BRANCH: ghpages
19+
jobs:
20+
deploy-preview:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- name: Checkout
24+
uses: actions/checkout@v6
25+
- uses: actions/setup-node@v4
26+
27+
- name: Set up Git
28+
run: |
29+
git config --global user.name "Github Actions"
30+
git config --global user.email "actions@github.com"
31+
32+
- name: Install and Build
33+
run: |
34+
npm install
35+
npm run ghpages:build
36+
37+
# Reference: https://github.com/rossjrw/pr-preview-action
38+
- name: Deploy preview
39+
uses: rossjrw/pr-preview-action@v1
40+
id: preview-step
41+
with:
42+
source-dir: ./ghpages
43+
umbrella-dir: pr
44+
preview-branch: ${{ env.PREVIEW_BRANCH }}
45+
comment: false
46+
47+
- uses: marocchino/sticky-pull-request-comment@v2
48+
if: steps.preview-step.outputs.deployment-action == 'deploy'
49+
with:
50+
header: pr-preview
51+
message: |
52+
[PR Preview Action](https://github.com/rossjrw/pr-preview-action) ${{ steps.preview-step.outputs.action-version }}
53+
:---:
54+
| <p></p> :rocket: View preview at <br> ${{ steps.preview-step.outputs.preview-url }} <br><br>
55+
| <h6>Built to branch [`${{ env.PREVIEW_BRANCH }}`](${{ github.server_url }}/${{ github.repository }}/tree/${{ env.PREVIEW_BRANCH }}) at ${{ steps.preview-step.outputs.action-start-time }}. <br> Preview will be ready when the [GitHub Pages deployment](${{ github.server_url }}/${{ github.repository }}/deployments) is complete. <br><br> </h6>
56+
57+
- uses: marocchino/sticky-pull-request-comment@v2
58+
if: steps.preview-step.outputs.deployment-action == 'remove'
59+
with:
60+
header: pr-preview
61+
message: |
62+
[PR Preview Action](https://github.com/rossjrw/pr-preview-action) ${{ steps.preview-step.outputs.action-version }}
63+
:---:
64+
Preview removed because the pull request was closed.
65+
${{ steps.preview-step.outputs.action-start-time }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,4 @@ node_modules/
1515
dist
1616
coverage
1717
__screenshots__
18+
ghpages

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ import '@demo/story-template';
6565
...
6666
render() {
6767
return html`
68-
<story-template elementTag="ia-button" .exampleUsage=${this.exampleUsage}>
68+
<story-template elementTag="ia-button" elementClassName="IAButton" .exampleUsage=${this.exampleUsage}>
6969
<div slot="demo">
7070
<ia-button @click=${() => alert('Button clicked!')}
7171
>Click Me</ia-button

demo/app-root.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,22 @@ import { customElement } from 'lit/decorators.js';
33

44
import '@src/elements/ia-button/ia-button-story';
55
import '@src/labs/ia-snow/ia-snow-story';
6+
import '@src/elements/ia-status-indicator/ia-status-indicator-story';
67

78
@customElement('app-root')
89
export class AppRoot extends LitElement {
910
render() {
1011
return html`
1112
<h1>🏛️ Internet Archive Elements ⚛️</h1>
1213
13-
<ia-button-story></ia-button-story>
14+
<h2>🚀 Production-Ready Elements</h2>
15+
16+
<ia-status-indicator-story></ia-status-indicator-story>
17+
18+
<h2>🧪 Labs Elements</h2>
1419
1520
<ia-snow-story></ia-snow-story>
21+
<ia-button-story></ia-button-story>
1622
`;
1723
}
1824
}

demo/index.css

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
line-height: 1.5;
44
font-weight: 400;
55

6-
color-scheme: light dark;
7-
color: rgba(255, 255, 255, 0.87);
8-
background-color: #242424;
6+
color-scheme: light;
7+
color: #213547;
8+
background-color: #ffffff;
99

1010
font-synthesis: none;
1111
text-rendering: optimizeLegibility;
@@ -28,10 +28,3 @@ body {
2828
min-width: 320px;
2929
min-height: 100vh;
3030
}
31-
32-
@media (prefers-color-scheme: light) {
33-
:root {
34-
color: #213547;
35-
background-color: #ffffff;
36-
}
37-
}

0 commit comments

Comments
 (0)