Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 76 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: Build and Deploy

on:
push:
branches:
- source
pull_request:
branches:
- source

permissions:
contents: write

jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '17'

- name: Set up Leiningen
uses: DeLaGuardo/setup-clojure@13.4
with:
lein: 'latest'

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Install Sass
run: npm install -g sass

- name: Maven cache
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('project.clj') }}
restore-keys: |
${{ runner.os }}-maven-

- name: Build site
run: lein run

- name: Copy CNAME
run: cp CNAME resources/public/CNAME

- name: Deploy to GitHub Pages
if: github.event_name == 'push' && github.ref == 'refs/heads/source'
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: master
folder: resources/public

- name: Purge Cloudflare Cache
if: github.event_name == 'push' && github.ref == 'refs/heads/source'
env:
CLOUDFLARE_ZONE: ${{ secrets.CLOUDFLARE_ZONE }}
CLOUDFLARE_EMAIL: ${{ secrets.CLOUDFLARE_EMAIL }}
CLOUDFLARE_TOKEN: ${{ secrets.CLOUDFLARE_TOKEN }}
run: |
if [ -n "$CLOUDFLARE_ZONE" ]; then
curl -X DELETE "https://api.cloudflare.com/client/v4/zones/$CLOUDFLARE_ZONE/purge_cache" \
-H "X-Auth-Email: $CLOUDFLARE_EMAIL" \
-H "X-Auth-Key: $CLOUDFLARE_TOKEN" \
-H "Content-Type: application/json" \
--data '{"purge_everything":true}'
else
echo "Cloudflare zone not set, skipping cache purge"
fi
37 changes: 0 additions & 37 deletions .travis.yml

This file was deleted.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# yetibot.github.io

[![Build Status](https://travis-ci.org/yetibot/yetibot.github.io.svg?branch=source)](https://travis-ci.org/yetibot/yetibot.github.io)
[![Build Status](https://github.com/yetibot/yetibot.github.io/actions/workflows/deploy.yml/badge.svg?branch=source)](https://github.com/yetibot/yetibot.github.io/actions/workflows/deploy.yml)

This is the static site generator source for
[https://yetibot.com](https://yetibot.com).
Expand All @@ -15,7 +15,7 @@ It's built on [Cryogen](http://cryogenweb.org/).
e.g.

```
gem install sass
npm install -g sass
```
- [yarn or npm](https://yarnpkg.com/en/)

Expand Down
Loading