Remove deployment workflow and update README

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
Harsh Shandilya 2020-08-25 14:53:13 +05:30
parent 28458e5ba7
commit 8e23bc4b71
2 changed files with 1 additions and 63 deletions

View File

@ -1,62 +0,0 @@
name: Deploy
on:
push:
branches:
- src
jobs:
build-deploy:
runs-on: ubuntu-18.04
if: "!contains(github.event.head_commit.message, '[skip deploy]')"
steps:
- uses: actions/checkout@master
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2.2.2
with:
hugo-version: '0.73.0'
extended: true
- name: Build prod
if: "!contains(github.event.head_commit.message, '[skip prod]')"
run: |
rm -rf public/
hugo --minify
- name: Deploy to prod
if: "!contains(github.event.head_commit.message, '[skip prod]')"
run: source $GITHUB_WORKSPACE/ci/deploy.sh
env:
ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }}
SSH_USERNAME: ${{ secrets.SSH_USERNAME }}
SERVER_ADDRESS: ${{ secrets.SERVER_ADDRESS }}
SERVER_DESTINATION: ${{ secrets.SERVER_DESTINATION_PROD }}
SSH_PORT: ${{ secrets.SSH_PORT }}
lighthouse:
runs-on: ubuntu-latest
needs: [build-deploy]
steps:
- name: Audit URL using Lighthouse
uses: docker://jakejarvis/lighthouse-action:latest
with:
url: 'https://msfjarvis.dev/'
- name: Upload results as an artifact
uses: actions/upload-artifact@master
with:
name: report
path: './report'
purge-cloudflare-cache:
runs-on: ubuntu-18.04
if: "contains(github.event.head_commit.message, '[purge cache]')"
steps:
- name: Purge Cloudflare cache
run: |
curl -s -X POST "https://api.cloudflare.com/client/v4/zones/${CF_ZONE_ID}/purge_cache" \
-H "X-Auth-Email: me@msfjarvis.dev" -H "X-Auth-Key: ${CF_API_KEY}" \
-H "Content-Type: application/json" --data '{ "purge_everything": true}'
env:
CF_API_KEY: ${{ secrets.CLOUDFLARE_API_KEY }}
CF_ZONE_ID: ${{ secrets.CLOUDFLARE_ZONE_ID }}

View File

@ -1,3 +1,3 @@
# msfjarvis.dev [![Deployment workflow](https://github.com/msfjarvis/msfjarvis.dev/workflows/Hugo%20deployment/badge.svg)](https://github.com/msfjarvis/msfjarvis.dev/actions?query=workflow%3A%22Hugo+deployment%22) [![Lighthouse workflow](https://github.com/msfjarvis/msfjarvis.dev/workflows/Lighthouse%20testing/badge.svg)](https://github.com/msfjarvis/msfjarvis.dev/actions?query=workflow%3A%22Lighthouse+testing%22)
# msfjarvis.dev [![Netlify Status](https://api.netlify.com/api/v1/badges/05925653-db74-4330-be83-60e83384f868/deploy-status)](https://app.netlify.com/sites/msfjarvis-dev/deploys)
Source code for my website at [msfjarvis.dev](https://msfjarvis.dev). It's built with [Hugo](https://github.com/gohugoio/hugo), deployed continuously by [GitHub Actions](https://github.com/features/actions) and served by [Caddy](https://caddyserver.com) behind [Cloudflare](https://cloudflare.com). I use a mix of local editing and the [Forestry](https://forestry.io) CMS for managing the content on the site.