/deploy-hugo-to-the-firebase

A simple GitHub action to deploy a static web site built by HUGO to the Firebase

Primary LanguageDockerfileMIT LicenseMIT

Deploy HUGO to the Firebase

HUGO version 0.73.0

A simple GitHub action that will build your static website with HUGO and deploy it with Firebase.

Setup

Generate Firebase Token

First we need to generate Firebase Token, so that action can deploy on your behalf.

  1. Make sure you have firebase CLI installed. If you have npm simply run npm install -g firebase-tools
  2. Make sure you are logged in to your firebase account by running firebase login.
  3. Run firebase login:ci to generate firebase token

Configure your workflow

Before setting up your workflow, we need to create new GitHub Secret, where freshly generated Firebase Token will be stored.

  1. Create a new GitHub Secret, e.g. firebase_token
  2. Copy/Paste freshly generated token (result of firebase login:ci)

Now it is time to configure your workflow with the help of current action. Check out example below for inspiration.

Configuration Example

on: [push]
name: Deploy HUGO to the Firebase
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v1
      with:
        submodules: true
    - uses: vudoodv/deploy-hugo-to-the-firebase@master
      with:
        firebase-token: ${{ secrets.firebase_token }}
        alias: ${{ alias }} // Optional