Skip to content

Commit 76c790c

Browse files
authored
Merge pull request #236 from sviete/alfa
Alfa to Master
2 parents 7bb052e + 471b5cc commit 76c790c

File tree

438 files changed

+11110
-203555
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

438 files changed

+11110
-203555
lines changed

.devcontainer/devcontainer.json

Lines changed: 30 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -5,33 +5,39 @@
55
"context": ".."
66
},
77
"appPort": "8124:8123",
8-
"context": "..",
98
"postCreateCommand": "script/bootstrap",
10-
"extensions": [
11-
"github.vscode-pull-request-github",
12-
"dbaeumer.vscode-eslint",
13-
"ms-vscode.vscode-typescript-tslint-plugin",
14-
"esbenp.prettier-vscode",
15-
"bierner.lit-html",
16-
"runem.lit-plugin",
17-
"ms-python.vscode-pylance"
18-
],
199
"containerEnv": {
2010
"WORKSPACE_DIRECTORY": "${containerWorkspaceFolder}"
2111
},
22-
"settings": {
23-
"terminal.integrated.shell.linux": "/bin/bash",
24-
"files.eol": "\n",
25-
"editor.tabSize": 2,
26-
"editor.formatOnPaste": false,
27-
"editor.formatOnSave": true,
28-
"editor.formatOnType": true,
29-
"[typescript]": {
30-
"editor.defaultFormatter": "esbenp.prettier-vscode"
31-
},
32-
"[javascript]": {
33-
"editor.defaultFormatter": "esbenp.prettier-vscode"
34-
},
35-
"files.trimTrailingWhitespace": true
12+
"customizations": {
13+
"vscode": {
14+
"extensions": [
15+
"dbaeumer.vscode-eslint",
16+
"esbenp.prettier-vscode",
17+
"runem.lit-plugin",
18+
"github.vscode-pull-request-github",
19+
"eamodio.gitlens"
20+
],
21+
"settings": {
22+
"files.eol": "\n",
23+
"editor.tabSize": 2,
24+
"editor.formatOnPaste": false,
25+
"editor.formatOnSave": true,
26+
"editor.formatOnType": true,
27+
"editor.renderWhitespace": "boundary",
28+
"editor.rulers": [80],
29+
"[typescript]": {
30+
"editor.defaultFormatter": "esbenp.prettier-vscode"
31+
},
32+
"[javascript]": {
33+
"editor.defaultFormatter": "esbenp.prettier-vscode"
34+
},
35+
"files.trimTrailingWhitespace": true,
36+
"terminal.integrated.shell.linux": "/usr/bin/zsh",
37+
"gitlens.showWelcomeOnInstall": false,
38+
"gitlens.showWhatsNewAfterUpgrades": false,
39+
"workbench.startupEditor": "none"
40+
}
41+
}
3642
}
3743
}
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
name: Cast deployment
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: "0 0 * * *"
7+
push:
8+
branches:
9+
- master
10+
11+
env:
12+
NODE_VERSION: 16
13+
NODE_OPTIONS: --max_old_space_size=6144
14+
15+
jobs:
16+
deploy_dev:
17+
runs-on: ubuntu-latest
18+
name: Deploy Development
19+
if: github.event_name != 'push'
20+
environment:
21+
name: Cast Development
22+
url: ${{ steps.deploy.outputs.NETLIFY_LIVE_URL || steps.deploy.outputs.NETLIFY_URL }}
23+
steps:
24+
- name: Check out files from GitHub
25+
uses: actions/checkout@v3
26+
with:
27+
ref: dev
28+
29+
- name: Set up Node ${{ env.NODE_VERSION }}
30+
uses: actions/setup-node@v3
31+
with:
32+
node-version: ${{ env.NODE_VERSION }}
33+
cache: yarn
34+
35+
- name: Install dependencies
36+
run: yarn install
37+
env:
38+
CI: true
39+
40+
- name: Build Cast
41+
run: ./node_modules/.bin/gulp build-cast
42+
env:
43+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44+
45+
- name: Deploy to Netlify
46+
id: deploy
47+
uses: netlify/actions/cli@master
48+
with:
49+
args: deploy --dir=cast/dist --alias dev
50+
env:
51+
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
52+
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_CAST_SITE_ID }}
53+
54+
deploy_master:
55+
runs-on: ubuntu-latest
56+
name: Deploy Production
57+
if: github.event_name == 'push'
58+
environment:
59+
name: Cast Production
60+
url: ${{ steps.deploy.outputs.NETLIFY_LIVE_URL || steps.deploy.outputs.NETLIFY_URL }}
61+
steps:
62+
- name: Check out files from GitHub
63+
uses: actions/checkout@v3
64+
with:
65+
ref: master
66+
67+
- name: Set up Node ${{ env.NODE_VERSION }}
68+
uses: actions/setup-node@v3
69+
with:
70+
node-version: ${{ env.NODE_VERSION }}
71+
cache: yarn
72+
73+
- name: Install dependencies
74+
run: yarn install
75+
env:
76+
CI: true
77+
78+
- name: Build Cast
79+
run: ./node_modules/.bin/gulp build-cast
80+
env:
81+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
82+
83+
- name: Deploy to Netlify
84+
id: deploy
85+
uses: netlify/actions/cli@master
86+
with:
87+
args: deploy --dir=cast/dist --prod
88+
env:
89+
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
90+
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_CAST_SITE_ID }}

.github/workflows/ci.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ on:
1313
env:
1414
NODE_VERSION: 16
1515
NODE_OPTIONS: --max_old_space_size=6144
16+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1617

1718
jobs:
1819
lint:
Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1-
name: Demo
1+
name: Demo deployment
22

33
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: "0 0 * * *"
47
push:
58
branches:
69
- dev
@@ -12,22 +15,34 @@ env:
1215
jobs:
1316
deploy:
1417
runs-on: ubuntu-latest
18+
environment:
19+
name: Demo
20+
url: ${{ steps.deploy.outputs.NETLIFY_LIVE_URL || steps.deploy.outputs.NETLIFY_URL }}
1521
steps:
1622
- name: Check out files from GitHub
1723
uses: actions/checkout@v3
24+
1825
- name: Set up Node ${{ env.NODE_VERSION }}
1926
uses: actions/setup-node@v3
2027
with:
2128
node-version: ${{ env.NODE_VERSION }}
2229
cache: yarn
30+
2331
- name: Install dependencies
2432
run: yarn install
2533
env:
2634
CI: true
35+
2736
- name: Build Demo
2837
run: ./node_modules/.bin/gulp build-demo
38+
env:
39+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40+
2941
- name: Deploy to Netlify
30-
run: npx netlify-cli deploy --dir=demo/dist --prod
42+
id: deploy
43+
uses: netlify/actions/cli@master
44+
with:
45+
args: deploy --dir=demo/dist --prod
3146
env:
3247
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
3348
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_DEMO_DEV_SITE_ID }}
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Design deployment
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: "0 0 * * *"
7+
8+
env:
9+
NODE_VERSION: 16
10+
NODE_OPTIONS: --max_old_space_size=6144
11+
12+
jobs:
13+
deploy:
14+
runs-on: ubuntu-latest
15+
environment:
16+
name: Design
17+
url: ${{ steps.deploy.outputs.NETLIFY_LIVE_URL || steps.deploy.outputs.NETLIFY_URL }}
18+
steps:
19+
- name: Check out files from GitHub
20+
uses: actions/checkout@v3
21+
22+
- name: Set up Node ${{ env.NODE_VERSION }}
23+
uses: actions/setup-node@v3
24+
with:
25+
node-version: ${{ env.NODE_VERSION }}
26+
cache: yarn
27+
28+
- name: Install dependencies
29+
run: yarn install
30+
env:
31+
CI: true
32+
33+
- name: Build Gallery
34+
run: ./node_modules/.bin/gulp build-gallery
35+
env:
36+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
37+
38+
- name: Deploy to Netlify
39+
id: deploy
40+
uses: netlify/actions/cli@master
41+
with:
42+
args: deploy --dir=gallery/dist --prod
43+
env:
44+
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
45+
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_GALLERY_SITE_ID }}
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Design preview
2+
3+
on:
4+
pull_request:
5+
types:
6+
- opened
7+
- synchronize
8+
- reopened
9+
- labeled
10+
branches:
11+
- dev
12+
13+
env:
14+
NODE_VERSION: 16
15+
NODE_OPTIONS: --max_old_space_size=6144
16+
17+
jobs:
18+
preview:
19+
runs-on: ubuntu-latest
20+
# Skip running on forks since it won't have access to secrets
21+
# Skip running PRs without 'needs design preview' label
22+
if: github.repository == 'home-assistant/frontend' && contains(github.event.pull_request.labels.*.name, 'needs design preview')
23+
steps:
24+
- name: Check out files from GitHub
25+
uses: actions/checkout@v3
26+
27+
- name: Set up Node ${{ env.NODE_VERSION }}
28+
uses: actions/setup-node@v3
29+
with:
30+
node-version: ${{ env.NODE_VERSION }}
31+
cache: yarn
32+
33+
- name: Install dependencies
34+
run: yarn install
35+
env:
36+
CI: true
37+
38+
- name: Build Gallery
39+
run: ./node_modules/.bin/gulp build-gallery
40+
env:
41+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
42+
43+
- name: Deploy preview to Netlify
44+
id: deploy
45+
uses: netlify/actions/cli@master
46+
with:
47+
args: deploy --dir=gallery/dist --alias "deploy-preview-${{ github.event.number }}"
48+
env:
49+
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
50+
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_GALLERY_SITE_ID }}
51+
52+
- name: Generate summary
53+
run: |
54+
echo "${{ steps.deploy.outputs.NETLIFY_LIVE_URL || steps.deploy.outputs.NETLIFY_URL }}" >> "$GITHUB_STEP_SUMMARY"

.github/workflows/netflify.yml

Lines changed: 0 additions & 19 deletions
This file was deleted.

.github/workflows/nightly.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,8 @@ jobs:
4949
run: |
5050
pip install build
5151
yarn install
52-
52+
export SKIP_FETCH_NIGHTLY_TRANSLATIONS=1
5353
script/build_frontend
54-
5554
rm -rf dist home_assistant_frontend.egg-info
5655
python3 -m build
5756

.github/workflows/release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
python3 -m pip install twine build
5353
export TWINE_USERNAME="__token__"
5454
export TWINE_PASSWORD="${{ secrets.TWINE_TOKEN }}"
55-
55+
export SKIP_FETCH_NIGHTLY_TRANSLATIONS=1
5656
script/release
5757
5858
- name: Upload release assets

.gitignore

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,20 @@ build-translations
33
.reify-cache
44

55
# build
6-
build
7-
hass_frontend/*
8-
dist
6+
build/
7+
dist/
8+
/hass_frontend/
9+
/translations/
910

1011
# yarn
11-
.yarn/*
12+
.yarn/**
1213
!.yarn/patches
1314
!.yarn/releases
1415
!.yarn/plugins
1516
!.yarn/sdks
1617
!.yarn/versions
1718
.pnp.*
18-
node_modules/*
19+
/node_modules/
1920
yarn-error.log
2021
npm-debug.log
2122

@@ -27,11 +28,11 @@ npm-debug.log
2728
# venv stuff
2829
pyvenv.cfg
2930
pip-selfcheck.json
30-
venv/*
31+
/venv/
3132
.venv
3233

3334
# vscode
34-
.vscode/*
35+
.vscode/**
3536
!.vscode/extensions.json
3637
!.vscode/launch.json
3738
!.vscode/tasks.json
@@ -46,4 +47,4 @@ src/cast/dev_const.ts
4647
.tool-versions
4748

4849
# Home Assistant config
49-
/config
50+
/config/

0 commit comments

Comments
 (0)