mu-haskell/.github/workflows/deploy.yml

64 lines
2.1 KiB
YAML
Raw Permalink Normal View History

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
with:
path: ~/.stack
2020-03-25 17:18:29 +03:00
key: ${{ runner.os }}-stack-${{ hashFiles('stack.yaml') }}
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-
- 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
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
- name: Build microsite from last release
run: |
LAST_TAG=$(git tag --sort=committerdate | tail -1)
git checkout $LAST_TAG
bash ./generate-haddock-docs.sh
2021-04-30 14:50:27 +03:00
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
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
- 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