mirror of
https://github.com/higherkindness/mu-haskell.git
synced 2024-08-17 02:10:22 +03:00
64 lines
2.1 KiB
YAML
64 lines
2.1 KiB
YAML
name: Deploy
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3.3.0
|
|
with:
|
|
submodules: true
|
|
- name: Unshallow
|
|
run: git fetch --prune --unshallow
|
|
- uses: actions/cache@v3.2.2
|
|
name: Cache ~/.stack
|
|
with:
|
|
path: ~/.stack
|
|
key: ${{ runner.os }}-stack-${{ hashFiles('stack.yaml') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-stack-
|
|
- uses: actions/cache@v3.2.2
|
|
name: Cache .stack-work
|
|
with:
|
|
path: .stack-work
|
|
key: ${{ runner.os }}-stack-work-${{ hashFiles('stack.yaml') }}-${{ '**/*.hs' }}
|
|
restore-keys: |
|
|
${{ runner.os }}-stack-work-
|
|
- name: Get rdkafka
|
|
run: sudo apt-get install librdkafka-dev
|
|
- name: Get Ruby and Bundler
|
|
uses: ruby/setup-ruby@v1
|
|
with:
|
|
bundler: 2.1.2
|
|
ruby-version: 2.6
|
|
- name: Build microsite without Haddock
|
|
run: |
|
|
bundle config set path 'vendor/bundle'
|
|
bundle install --gemfile docs/Gemfile
|
|
BUNDLE_GEMFILE=./docs/Gemfile bundle exec jekyll build -b /mu-haskell -s docs -d gen-docs
|
|
- name: Get Standalone Haddock
|
|
run: stack --resolver lts-14.27 install standalone-haddock
|
|
- name: Build microsite from last release
|
|
run: |
|
|
LAST_TAG=$(git tag --sort=committerdate | tail -1)
|
|
git checkout $LAST_TAG
|
|
bash ./generate-haddock-docs.sh
|
|
bundle config set path 'vendor/bundle'
|
|
bundle install --gemfile docs/Gemfile
|
|
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
|
|
bash ./generate-haddock-docs.sh
|
|
bundle config set path 'vendor/bundle'
|
|
bundle install --gemfile docs/Gemfile
|
|
BUNDLE_GEMFILE=./docs/Gemfile bundle exec jekyll build -b /mu-haskell/wip -s docs -d gen-docs/wip
|
|
- name: Deploy microsite
|
|
uses: peaceiris/actions-gh-pages@v3
|
|
with:
|
|
github_token: ${{ secrets.ACTIONS_DEPLOY_KEY }}
|
|
publish_branch: gh-pages
|
|
publish_dir: ./gen-docs
|