1

Merge branch 'master' into software_timeline

This commit is contained in:
Evan Pratten 2022-12-18 12:45:35 -05:00
commit d4b234aad2
4 changed files with 81 additions and 61 deletions

44
.github/workflows/build.yml vendored Normal file
View File

@ -0,0 +1,44 @@
name: Build Website
on:
push:
branches:
- "*"
# Master has its own set of build rules,
# and will eventually call this script on its own
- "!master"
workflow_call:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: 12.x
- name: Install dependencies
run: npm install
- name: Compile assets
run: make
- name: Build
uses: TonySpegel/zola-build-action@v1
env:
CONFIG_FILE: "config.toml"
- name: Disable Jekyll
run: sudo touch ./public/.nojekyll
- name: Delete dist gitignore
run: sudo rm -f ./public/dist/.gitignore
- name: Upload site as artifact
uses: actions/upload-pages-artifact@v1
with:
path: ./public

35
.github/workflows/deploy.yml vendored Normal file
View File

@ -0,0 +1,35 @@
name: Deploy
on:
push:
branches:
- "master"
jobs:
build:
uses: ./.github/workflows/build.yml
deploy:
runs-on: ubuntu-latest
needs: build
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
# purge_cache:
# runs-on: ubuntu-latest
# needs: deploy
# environment:
# name: cloudflare-api
# steps:
# - name: Purge Cloudflare Cache
# uses: jakejarvis/cloudflare-purge-action@master
# env:
# CLOUDFLARE_ZONE: "ewpratten.com"
# CLOUDFLARE_TOKEN: ${{ secrets.CLOUDFLARE_TOKEN }}

View File

@ -1,61 +0,0 @@
name: Bundle Website
on: push
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: 12.x
- name: Install dependencies
run: npm install
- name: Compile assets
run: make
- name: Build
uses: TonySpegel/zola-build-action@v1
env:
CONFIG_FILE: "config.toml"
- name: Disable Jekyll
run: sudo touch ./public/.nojekyll
- name: Delete dist gitignore
run: sudo rm -f ./public/dist/.gitignore
- name: Publish site as artifact
uses: actions/upload-artifact@v2
with:
name: website
path: ./public
deploy:
runs-on: ubuntu-latest
needs: build
if: github.ref == 'refs/heads/master'
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Download website bundle
uses: actions/download-artifact@v2
with:
name: website
path: ./public
- name: Deploy to GitHub Pages
if: success()
uses: crazy-max/ghaction-github-pages@v2
with:
target_branch: gh-pages
build_dir: public
fqdn: ewpratten.com
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

2
CODEOWNERS Normal file
View File

@ -0,0 +1,2 @@
# Global owners
* @ewpratten