Skip to content

Commit

Permalink
ci: init github actions with firebase deploy and pr code linter
Browse files Browse the repository at this point in the history
  • Loading branch information
raffb authored Oct 19, 2020
1 parent 0e6eee2 commit adf1142
Show file tree
Hide file tree
Showing 5 changed files with 62 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .firebaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"projects": {
"default": "gdgcatania-site"
}
}
31 changes: 31 additions & 0 deletions .github/workflows/firebase-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: build-and-deploy-to-firebase
on:
push:
branches:
- release/*
jobs:
code-lint:
name: Run code linter
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@master
with:
node-version: '10.x'
- run: yarn install
- run: yarn lint
firebase-deploy:
name: Deploy to Firebase Hosting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@master
with:
node-version: '10.x'
- run: yarn install
- run: yarn generate
- uses: w9jds/firebase-action@master
with:
args: deploy --only hosting
env:
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
13 changes: 13 additions & 0 deletions .github/workflows/pr-code-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: build-and-deploy-to-firebase
on: pull_request
jobs:
code-lint:
name: Run code linter
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@master
with:
node-version: '10.x'
- run: yarn install
- run: yarn lint
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,6 @@ sw.*

# Vim swap files
*.swp

.firebase/
firebase-debug.log
10 changes: 10 additions & 0 deletions firebase.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"hosting": {
"public": "dist",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
]
}
}

0 comments on commit adf1142

Please sign in to comment.