Skip to content

Commit

Permalink
ci(homepage): deploy homepage
Browse files Browse the repository at this point in the history
  • Loading branch information
serjilyashenko committed Aug 24, 2024
1 parent b4dae7f commit 40309e6
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 8 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/homepage-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: homepage-deploy
run-name: deploy homepage to netlify 🚀

on:
push:
branches:
- master
paths:
- .github/workflows/homepage-deploy.yml
# - packages/**/* FIXME: do we need to watch packages ?
- apps/homepage/**/*

concurrency: ${{ github.workflow }}-${{ github.ref }}

jobs:
hompage-deploy-job:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm

- name: Install Netlify
run: npm install -g [email protected]

- name: Install Dependencies
run: npm ci

- name: Lint and test
run: npm run lint

- name: Build
run: npm run build

- name: Deploy to Netlify
id: netlify_deploy
run: |
netlify deploy \
--prod \
--dir apps/homepage/dist \
--site ${{ secrets.NETLIFY_SIMPLE_PIE_2_SITE_ID }} \
--auth ${{ secrets.NETLIFY_TOKEN }} \
--filter homepage \
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@

<hr/>

| project | badges |
|-----------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------|
| [homepage](https://simple-pie.netlify.app/) | [![homepage-legacy Netlify deploy](https://github.com/serjilyashenko/simple-pie-project/actions/workflows/homepage-legacy-deploy.yml/badge.svg?branch=master)](https://github.com/serjilyashenko/simple-pie-project/actions/workflows/homepage-legacy-deploy.yml) |
| [simple-pie](./packages/simple-pie/README.md) | ![NPM Version](https://img.shields.io/npm/v/simple-pie) ![npm bundle size](https://img.shields.io/bundlephobia/minzip/simple-pie) <br/> ![npm bundle size](https://img.shields.io/bundlephobia/min/simple-pie) ![NPM Downloads](https://img.shields.io/npm/dm/simple-pie) |
| project | badges |
|-----------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [homepage](https://simple-pie-2.netlify.app/) - 🚧WIP | TBD |
| [simple-pie](./packages/simple-pie/README.md) | ![NPM Version](https://img.shields.io/npm/v/simple-pie) ![npm bundle size](https://img.shields.io/bundlephobia/minzip/simple-pie) <br/> ![npm bundle size](https://img.shields.io/bundlephobia/min/simple-pie) ![NPM Downloads](https://img.shields.io/npm/dm/simple-pie) |
| [react-simple-pie](./packages/react-simple-pie/README.md) | ![NPM Version](https://img.shields.io/npm/v/react-simple-pie) ![npm bundle size](https://img.shields.io/bundlephobia/minzip/react-simple-pie) <br/> ![npm bundle size](https://img.shields.io/bundlephobia/min/react-simple-pie) ![NPM Downloads](https://img.shields.io/npm/dm/react-simple-pie) |
| [homepage-legacy](https://simple-pie.netlify.app/) | [![homepage-legacy Netlify deploy](https://github.com/serjilyashenko/simple-pie-project/actions/workflows/homepage-legacy-deploy.yml/badge.svg?branch=master)](https://github.com/serjilyashenko/simple-pie-project/actions/workflows/homepage-legacy-deploy.yml) |

## Overview

Expand Down Expand Up @@ -37,6 +38,7 @@ Simple-pie project is utilising a monorepo for a development and deployment. Rea
simple-pie-project
├─ docs
├─ apps
│ ├─ homepage
│ └─ homepage-legacy
└─ packages
├─ pie-math
Expand Down
4 changes: 2 additions & 2 deletions apps/homepage/src/content/docs/index.mdx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
title: Welcome to Simple Pie
title: WIP - Welcome to Simple Pie
description: Get started building your docs site with Starlight.
template: doc
hero:
tagline: Congrats on setting up a new Starlight project!
tagline: WIP - Congrats on setting up a new Starlight project!
image:
file: ../../assets/houston.webp
actions:
Expand Down
3 changes: 1 addition & 2 deletions docs/deploy.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Deploy

`homepage-legacy-deploy` is github-actions workflow. It deploys the legacy homepage
project to [Netlify](https://www.netlify.com).
`homepage` and `homepage-legacy-deploy` are github-actions workflows. They deploy the projects to [Netlify](https://www.netlify.com).

The flow is inspired by [Raul Melo's article](https://www.raulmelo.me/en/blog/deploying-netlify-github-actions-guide).

Expand Down
1 change: 1 addition & 0 deletions docs/monorepo.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ simple-pie-project
├─ config
├─ docs
├─ apps
│ ├─ homepage
│ └─ homepage-legacy
└─ packages
├─ pie-math
Expand Down

0 comments on commit 40309e6

Please sign in to comment.