Switch to Netlify

Signed-off-by: Tommy <contact@tommytran.io>
This commit is contained in:
Tommy 2022-07-21 11:22:12 -04:00 committed by tommytran732
parent d83e623eb8
commit 3b04829457
No known key found for this signature in database
GPG key ID: 060B29EB996BD9F2
18 changed files with 62 additions and 256 deletions

View file

@ -1,36 +0,0 @@
# This file was auto-generated by the Firebase CLI
# https://github.com/firebase/firebase-tools
name: Deploy to Firebase Hosting on merge
'on':
push:
branches:
- main
jobs:
Build_and_Deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: true # Fetch Hugo themes (true OR recursive)
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
#- name: Fecth External Blog
# run: ./external-blogs.sh
- name: Hugo setup
uses: peaceiris/actions-hugo@v2
with:
hugo-version: 'latest'
- name: Build
run: hugo --minify
- name: Deploy
uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_PRIVSEC_356523 }}'
channelId: live
projectId: privsec-356523

View file

@ -1,47 +0,0 @@
name: Deploy to Firebase Hosting on PR
on:
workflow_run:
workflows: ["Build Hugo site on PR"]
types:
- completed
jobs:
Preview:
runs-on: ubuntu-latest
if: >
${{ github.event.workflow_run.event == 'pull_request' &&
github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Download artifact
uses: actions/github-script@v3.1.0
with:
script: |
var artifacts = await github.actions.listWorkflowRunArtifacts({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: ${{github.event.workflow_run.id }},
});
var matchArtifact = artifacts.data.artifacts.filter((artifact) => {
return artifact.name == "hugo"
})[0];
var download = await github.actions.downloadArtifact({
owner: context.repo.owner,
repo: context.repo.repo,
artifact_id: matchArtifact.id,
archive_format: 'zip',
});
var fs = require('fs');
fs.writeFileSync('${{github.workspace}}/hugo.zip', Buffer.from(download.data));
- name: Unzip artifact
run: unzip hugo.zip
- name: Remove artifact zip
run: rm hugo.zip
- name: Deploy to Firebase
uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_PRIVSEC_356523 }}'
projectId: privsec-356523

View file

@ -1,31 +0,0 @@
# This file was auto-generated by the Firebase CLI
# https://github.com/firebase/firebase-tools
name: Build Hugo site on PR
'on': pull_request
jobs:
Build_Hugo_Site:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: true # Fetch Hugo themes (true OR recursive)
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
#- name: Fecth External Blog
# run: ./external-blogs.sh
- name: Hugo setup
uses: peaceiris/actions-hugo@v2
with:
hugo-version: 'latest'
- name: Build Hugo site
run: hugo --minify
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: hugo
path: .