Experimenting with CI
This commit is contained in:
parent
d4d1da172a
commit
5855b6f170
42
.github/workflows/zola.yml
vendored
42
.github/workflows/zola.yml
vendored
@ -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
19
vercel.json
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
"version": 2,
|
||||||
|
"public": false,
|
||||||
|
"github": {
|
||||||
|
"enabled": false
|
||||||
|
},
|
||||||
|
"builds": [
|
||||||
|
{
|
||||||
|
"src": "./public/**",
|
||||||
|
"use": "@now/static"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"routes": [
|
||||||
|
{
|
||||||
|
"src": "/(.*)",
|
||||||
|
"dest": "public/$1"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user