Skip to content

Commit d705e1b

Browse files
Update dist folder
1 parent 74174b0 commit d705e1b

File tree

14 files changed

+78
-78
lines changed

14 files changed

+78
-78
lines changed

.github/workflows/dist-pr.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,23 @@ jobs:
3333
run: |
3434
git config --global user.name 'googlemaps-bot'
3535
git config --global user.email '[email protected]'
36+
37+
- name: Aggressively clean Workspace
38+
run: |
39+
git reset --hard
40+
git clean -fdx
41+
ls -la # List all files (including hidden ones)
42+
43+
- name: List contents of dist
44+
run: |
45+
git fetch origin dist
46+
git checkout origin/dist
47+
ls -la dist
3648
3749
- name: Create Branch for PR
3850
run: |
3951
git fetch origin main
40-
git checkout -b dist-to-main-pr origin/dist
52+
git checkout -b dist-to-main-pr
4153
4254
- name: Create Pull Request
4355
run: |

.github/workflows/release.yml

Lines changed: 55 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -15,59 +15,69 @@
1515
name: Release
1616

1717
on:
18-
push: # Trigger on pushes to main
18+
push:
1919
branches:
2020
- main
2121

2222
jobs:
23-
release:
24-
runs-on: ubuntu-latest
25-
permissions:
26-
contents: write
27-
id-token: write
28-
env:
29-
GOOGLE_MAPS_JS_SAMPLES_KEY: "${{ secrets.GOOGLE_MAPS_JS_SAMPLES_KEY }}"
30-
steps:
31-
- name: Checkout code
32-
uses: actions/checkout@v3
33-
with:
34-
ref: dist
35-
token: ${{ secrets.GH_MERGE_TOKEN }}
36-
fetch-depth: 0
23+
release:
24+
runs-on: ubuntu-latest
25+
permissions:
26+
contents: write
27+
id-token: write # Needed for Firebase
28+
env:
29+
GOOGLE_MAPS_JS_SAMPLES_KEY: "${{ secrets.GOOGLE_MAPS_JS_SAMPLES_KEY }}"
30+
steps:
31+
- name: Checkout dist
32+
uses: actions/checkout@v3
33+
with:
34+
ref: dist # Checkout the *dist* branch initially.
35+
token: ${{ secrets.GH_MERGE_TOKEN }}
36+
fetch-depth: 0
3737

38-
- name: Set Git Identity
39-
run: |
40-
git config --global user.name 'googlemaps-bot'
41-
git config --global user.email '[email protected]'
38+
- name: Set Git Identity
39+
run: |
40+
git config --global user.name 'googlemaps-bot'
41+
git config --global user.email '[email protected]'
42+
43+
- name: Fetch main
44+
run: git fetch origin main:main
4245

43-
- uses: actions/cache@v3
44-
with:
45-
path: ~/.npm
46-
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
47-
restore-keys: |
48-
${{ runner.os }}-node
46+
- name: Copy Files from Main (Except dist)
47+
run: |
48+
git checkout main -- .
49+
rm -rf dist
4950
50-
- uses: actions/setup-node@v3
51-
with:
52-
node-version: '22.x'
51+
- uses: actions/cache@v3
52+
with:
53+
path: ~/.npm
54+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
55+
restore-keys: |
56+
${{ runner.os }}-node
5357
54-
- run: npm i
55-
- run: npm run build-all
56-
57-
- uses: google-github-actions/auth@v1
58-
with:
59-
credentials_json: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_KEY }}
60-
61-
- name: Install Firebase CLI
62-
run: npm install -g firebase-tools
63-
64-
- name: Deploy to Firebase Hosting
65-
run: firebase deploy --only hosting
58+
- uses: actions/setup-node@v3
59+
with:
60+
node-version: '22.x'
6661

67-
- name: Force Checkout dist and Overwrite
68-
run: |
69-
git fetch origin main
70-
git checkout -B dist origin/main
71-
git add dist
62+
- run: npm i
63+
- run: npm run build-all
64+
65+
- uses: google-github-actions/auth@v1
66+
with:
67+
credentials_json: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_KEY }}
68+
69+
- name: Install Firebase CLI
70+
run: npm install -g firebase-tools
71+
72+
- name: Deploy to Firebase Hosting
73+
run: firebase deploy --only hosting
74+
75+
- name: Commit and Push Changes (to dist)
76+
run: |
77+
git add dist
78+
if git diff --staged --quiet; then
79+
echo "No changes to commit"
80+
else
7281
git commit -m "Update dist folder"
7382
git push --force origin dist
83+
fi

dist/index.html

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

dist/samples/add-map/app/.env

Lines changed: 0 additions & 1 deletion
This file was deleted.

dist/samples/map-simple/app/.env

Lines changed: 0 additions & 1 deletion
This file was deleted.

dist/samples/map-simple/jsfiddle/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
See the License for the specific language governing permissions and
1515
limitations under the License.
1616
-->
17-
<!-- [START maps_map_simple] -->
17+
1818
<html>
1919
<head>
2020
<title>Simple Map</title>
@@ -30,4 +30,4 @@
3030
({key: "AIzaSyA6myHzS10YXdcazAFalmXvDkrYCp5cLc8", v: "weekly"});</script>
3131
</body>
3232
</html>
33-
<!-- [END maps_map_simple] -->
33+

dist/samples/place-autocomplete-element/app/.env

Lines changed: 0 additions & 1 deletion
This file was deleted.

dist/samples/place-autocomplete-element/jsfiddle/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Copyright 2019 Google LLC. All Rights Reserved.
55
SPDX-License-Identifier: Apache-2.0
66
-->
7-
<!-- [START maps_place_autocomplete_element] -->
7+
88
<html>
99
<head>
1010
<title>Place Autocomplete element</title>
@@ -20,4 +20,4 @@
2020
({key: "AIzaSyA6myHzS10YXdcazAFalmXvDkrYCp5cLc8", v: "beta"});</script>
2121
</body>
2222
</html>
23-
<!-- [END maps_place_autocomplete_element] -->
23+

dist/samples/place-autocomplete-map/app/.env

Lines changed: 0 additions & 1 deletion
This file was deleted.

dist/samples/place-autocomplete-map/app/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ async function initMap(): Promise<void> {
5555
// [START maps_place_autocomplete_map_listener]
5656
// Add the gmp-placeselect listener, and display the results on the map.
5757
//@ts-ignore
58-
placeAutocomplete.addEventListener('gmp-placeselect', async ({ place }) => { // TODO: gmp-placeselect -> gmp-select; place -> placePrediction.
58+
placeAutocomplete.addEventListener('gmp-placeselect', async ({ place }) => { // TODO: gmp-placeselect -> gmp-select; place -> placePrediction
5959
await place.fetchFields({ fields: ['displayName', 'formattedAddress', 'location'] });
6060

6161
// If the place has a geometry, then present it on a map.

0 commit comments

Comments
 (0)