forked from spf13/cobra.dev
-
-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (37 loc) · 1.22 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# This is a simple workflow to build a Hugo site and then deploy it on Firebase Hosting
name: Hugo deploy to Firebase
# Triggers when any commit is pushed on Master
on:
push:
branches: [ master ]
jobs:
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
with:
submodules: true
fetch-depth: 0
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.89.0'
extended: true
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '14'
- run: npm install -g postcss postcss-cli autoprefixer
- run: hugo
- uses: spf13/deploy-firebase@v0.0.6
env:
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
FIREBASE_PROJECT: "spf13-project-hosting"
FIREBASE_TARGET: "cobra"
# Fetch Hugo to Firebase docker image
# - uses: spf13/Hugo-On-Fire@master
# env:
# FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}