Skip to content

Commit

Permalink
docs: deploy website via GitHub actions – first try
Browse files Browse the repository at this point in the history
  • Loading branch information
usefulthink committed Sep 7, 2023
1 parent fa5fbe2 commit ca1daad
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 3 deletions.
61 changes: 61 additions & 0 deletions .github/workflows/deploy-website.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Deploy to Pages

on:
# Runs on pushes targeting the default branch
push:
branches: ['main']

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: 'pages'
cancel-in-progress: false

jobs:
build:
name: Build Website
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup node
uses: actions/setup-node@v3
with:
node-version: '18'
cache: npm

- name: Install dependencies
run: npm ci
working-directory: ./website

- name: Build website
run: |
npm run build
working-directory: ./website

- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: ./website/build

# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Google Maps React
# React Comnponents for the Google Maps API

[![MIT License](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/ubilabs/google-maps-react-hooks/tree/main/LICENSE)
[![MIT License](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/visgl/react-google-maps/tree/main/LICENSE)

A library to integrate the Google Maps JavaScript API into React Applications
using simple components or hooks.
Expand Down
2 changes: 1 addition & 1 deletion src/components/map.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export type MapProps = google.maps.MapOptions & {
*/
className?: string;
/**
* Adds initial bounds to the map
* Adds initial bounds to the map as an alternative to specifying the center/zoom of the map.
* Calls the fitBounds method internally https://developers.google.com/maps/documentation/javascript/reference/map?hl=en#Map-Methods
*/
initialBounds?: google.maps.LatLngBounds | google.maps.LatLngBoundsLiteral;
Expand Down

0 comments on commit ca1daad

Please sign in to comment.