Testing
This commit is contained in:
parent
db7f0948cf
commit
ab5b85f1d2
9
.github/workflows/build.yml
vendored
Normal file
9
.github/workflows/build.yml
vendored
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
name: Build Commit
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- "!master"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
call-build:
|
||||||
|
uses: ./.github/workflows/common/build-site.yml
|
39
.github/workflows/common/build-site.yml
vendored
Normal file
39
.github/workflows/common/build-site.yml
vendored
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
name: Build Website
|
||||||
|
|
||||||
|
on:
|
||||||
|
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: Publish site as artifact
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: website
|
||||||
|
path: ./public
|
51
.github/workflows/publish.yml
vendored
51
.github/workflows/publish.yml
vendored
@ -1,54 +1,17 @@
|
|||||||
name: Bundle Website
|
name: Deploy
|
||||||
on: push
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- "master"
|
||||||
|
|
||||||
jobs:
|
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:
|
deploy:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: build
|
needs: build
|
||||||
if: github.ref == 'refs/heads/master'
|
if: github.ref == 'refs/heads/master'
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Build Site
|
||||||
uses: actions/checkout@v2
|
uses: ./.github/workflows/common/build-site.yml
|
||||||
|
|
||||||
- name: Download website bundle
|
|
||||||
uses: actions/download-artifact@v2
|
|
||||||
with:
|
|
||||||
name: website
|
|
||||||
path: ./public
|
|
||||||
|
|
||||||
- name: Deploy to GitHub Pages
|
- name: Deploy to GitHub Pages
|
||||||
if: success()
|
if: success()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user