1

Experimenting with CI

This commit is contained in:
Evan Pratten 2021-08-21 10:34:54 -04:00
parent d4d1da172a
commit 5855b6f170
2 changed files with 36 additions and 25 deletions

View File

@ -1,32 +1,24 @@
name: CI
on: on:
push: push:
branches: branches: [master]
- master
pull_request:
jobs: jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: github.ref != 'refs/heads/master'
steps: steps:
- name: 'Checkout' - uses: actions/checkout@v2
uses: actions/checkout@master - name: Install and Run Zola
- name: 'Build only' run: |
uses: shalzz/zola-deploy-action@master sudo snap install --edge zola
env: zola build
BUILD_DIR: .
TOKEN: ${{ secrets.GITHUB_TOKEN }} - uses: amondnet/vercel-action@v19
BUILD_ONLY: true with:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
build_and_deploy: github-token: ${{ secrets.GITHUB_TOKEN }}
runs-on: ubuntu-latest vercel-org-id: ${{ secrets.ORG_ID}}
if: github.ref == 'refs/heads/master' vercel-project-id: ${{ secrets.PROJECT_ID}}
steps: working-directory: ./public
- name: 'Checkout'
uses: actions/checkout@master
- name: 'Build and deploy'
uses: shalzz/zola-deploy-action@master
env:
PAGES_BRANCH: gh-pages
BUILD_DIR: .
TOKEN: ${{ secrets.GITHUB_TOKEN }}

19
vercel.json Normal file
View File

@ -0,0 +1,19 @@
{
"version": 2,
"public": false,
"github": {
"enabled": false
},
"builds": [
{
"src": "./public/**",
"use": "@now/static"
}
],
"routes": [
{
"src": "/(.*)",
"dest": "public/$1"
}
]
}