Skip to content

Commit

Permalink
Update GitHub CI workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
kossnocorp committed Dec 17, 2023
1 parent 949b1c5 commit 839d834
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 10 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/firebase-hosting-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,23 @@
# https://github.com/firebase/firebase-tools

name: Deploy to Firebase Hosting on merge
'on':
"on":
push:
branches:
- main
jobs:
build_and_deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
cache: "npm"
- run: npm install
- run: npm run build
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_DATE_FNS_BLOG_A7797 }}'
repoToken: "${{ secrets.GITHUB_TOKEN }}"
firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT_DATE_FNS_BLOG_A7797 }}"
channelId: live
projectId: date-fns-blog-a7797
14 changes: 9 additions & 5 deletions .github/workflows/firebase-hosting-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,20 @@
# https://github.com/firebase/firebase-tools

name: Deploy to Firebase Hosting on PR
'on': pull_request
"on": pull_request
jobs:
build_and_preview:
if: '${{ github.event.pull_request.head.repo.full_name == github.repository }}'
if: "${{ github.event.pull_request.head.repo.full_name == github.repository }}"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
cache: "npm"
- run: npm install
- run: npm run build
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_DATE_FNS_BLOG_A7797 }}'
repoToken: "${{ secrets.GITHUB_TOKEN }}"
firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT_DATE_FNS_BLOG_A7797 }}"
projectId: date-fns-blog-a7797
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "",
"name": "@date-fns/blog",
"type": "module",
"version": "0.0.1",
"scripts": {
Expand Down

0 comments on commit 839d834

Please sign in to comment.