deckgo / deckdeckgo

The web open source editor for presentations
https://deckdeckgo.com
1.64k stars 178 forks source link

CI: GitHub actions to deploy PWAs to Firebase #507

Open peterpeterparker opened 4 years ago

peterpeterparker commented 4 years ago

Description

Build and deploy "docs", "remote" and "studio" using GitHub actions CI.

Nota bene:

  1. For the "docs" and "remote" that should be straight forward. For "studio" I should double check how to replace the obfuscated token in the build with environment secrets

  2. If we deploy from "master" then PR should be merged first to a "staging" or "next_version" branch? or should we have a "release" branch? Or the CI trigger should not be a push to master?

  3. Also the "docs" build might fail at first in the CI as md file are converted and injected to tsx with a custom script

How to

Follow the tutorial of @shprink:

https://julienrenaux.fr/2019/11/25/building-deploying-stenciljs-apps-firebase-hosting-github-actions/

peterpeterparker commented 4 years ago

It need a couple of retry to adjust the code because we have a monorepo, but the CI for the docs is done: https://github.com/deckgo/deckdeckgo/blob/master/.github/workflows/docs.yml

P.S.: there was no problem with the generation of the markdown doc, all good on a first try

peterpeterparker commented 4 years ago

Remote CI also added. Same rules as docs (trigger master push if change happened in subfolder remote following by Firebase deployment)