2020-01-09 19:41:26 +03:00
|
|
|
name: Deploy
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-01-07 23:26:23 +03:00
|
|
|
- uses: actions/checkout@v3.3.0
|
2020-11-23 11:30:43 +03:00
|
|
|
with:
|
|
|
|
submodules: true
|
2020-11-19 12:35:24 +03:00
|
|
|
- name: Unshallow
|
|
|
|
run: git fetch --prune --unshallow
|
2023-01-07 23:26:23 +03:00
|
|
|
- uses: actions/cache@v3.2.2
|
2020-03-25 17:18:29 +03:00
|
|
|
name: Cache ~/.stack
|
2020-03-25 16:18:32 +03:00
|
|
|
with:
|
|
|
|
path: ~/.stack
|
2020-03-25 17:18:29 +03:00
|
|
|
key: ${{ runner.os }}-stack-${{ hashFiles('stack.yaml') }}
|
2020-03-25 16:18:32 +03:00
|
|
|
restore-keys: |
|
2020-03-25 17:18:29 +03:00
|
|
|
${{ runner.os }}-stack-
|
2023-01-07 23:26:23 +03:00
|
|
|
- uses: actions/cache@v3.2.2
|
2020-03-25 17:18:29 +03:00
|
|
|
name: Cache .stack-work
|
|
|
|
with:
|
|
|
|
path: .stack-work
|
|
|
|
key: ${{ runner.os }}-stack-work-${{ hashFiles('stack.yaml') }}-${{ '**/*.hs' }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-stack-work-
|
2020-03-02 15:20:51 +03:00
|
|
|
- name: Get rdkafka
|
|
|
|
run: sudo apt-get install librdkafka-dev
|
2021-04-30 12:00:39 +03:00
|
|
|
- name: Get Ruby and Bundler
|
|
|
|
uses: ruby/setup-ruby@v1
|
|
|
|
with:
|
2021-04-30 14:05:53 +03:00
|
|
|
bundler: 2.1.2
|
2021-04-30 12:12:51 +03:00
|
|
|
ruby-version: 2.6
|
2021-04-30 14:50:27 +03:00
|
|
|
- name: Build microsite without Haddock
|
2021-04-30 13:06:55 +03:00
|
|
|
run: |
|
|
|
|
bundle config set path 'vendor/bundle'
|
|
|
|
bundle install --gemfile docs/Gemfile
|
2021-04-30 14:05:53 +03:00
|
|
|
BUNDLE_GEMFILE=./docs/Gemfile bundle exec jekyll build -b /mu-haskell -s docs -d gen-docs
|
2021-04-30 12:12:51 +03:00
|
|
|
- name: Get Standalone Haddock
|
|
|
|
run: stack --resolver lts-14.27 install standalone-haddock
|
2020-01-27 14:27:52 +03:00
|
|
|
- name: Build microsite from last release
|
|
|
|
run: |
|
2023-01-08 10:31:44 +03:00
|
|
|
LAST_TAG=$(git tag --sort=committerdate | tail -1)
|
2020-01-27 14:27:52 +03:00
|
|
|
git checkout $LAST_TAG
|
2020-04-28 20:12:54 +03:00
|
|
|
bash ./generate-haddock-docs.sh
|
2021-04-30 14:50:27 +03:00
|
|
|
bundle config set path 'vendor/bundle'
|
|
|
|
bundle install --gemfile docs/Gemfile
|
2020-01-27 14:27:52 +03:00
|
|
|
BUNDLE_GEMFILE=./docs/Gemfile bundle exec jekyll build -b /mu-haskell -s docs -d gen-docs
|
|
|
|
- name: Build microsite from master
|
|
|
|
run: |
|
|
|
|
git checkout master
|
2020-01-27 19:32:07 +03:00
|
|
|
bash ./generate-haddock-docs.sh
|
2021-04-30 14:50:27 +03:00
|
|
|
bundle config set path 'vendor/bundle'
|
|
|
|
bundle install --gemfile docs/Gemfile
|
2020-01-27 15:09:34 +03:00
|
|
|
BUNDLE_GEMFILE=./docs/Gemfile bundle exec jekyll build -b /mu-haskell/wip -s docs -d gen-docs/wip
|
2020-01-09 19:41:26 +03:00
|
|
|
- name: Deploy microsite
|
2023-01-07 23:26:23 +03:00
|
|
|
uses: peaceiris/actions-gh-pages@v3
|
|
|
|
with:
|
|
|
|
github_token: ${{ secrets.ACTIONS_DEPLOY_KEY }}
|
|
|
|
publish_branch: gh-pages
|
|
|
|
publish_dir: ./gen-docs
|