Modify Actions
This commit is contained in:
parent
5e34a583d2
commit
3ef3a96fc8
|
@ -1,21 +1,36 @@
|
||||||
name: Powerlevel10k Documentation on Push
|
name: Powerlevel10k Documentation on Push
|
||||||
on: push
|
on: push
|
||||||
jobs:
|
jobs:
|
||||||
action-filter:
|
deploy:
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
ruby-version: 2.5
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@master
|
- uses: actions/checkout@v2
|
||||||
- name: files-filter
|
- name: Set up Ruby
|
||||||
uses: wcchristian/gh-pattern-filter-action@master
|
uses: ruby/setup-ruby@v1
|
||||||
with:
|
with:
|
||||||
args: .*\\.md$
|
ruby-version: ${{ env.ruby-version }}
|
||||||
- name: Build documentation
|
|
||||||
uses: docker://decathlon/slate-builder-action:2.0.0
|
- uses: actions/cache@v2
|
||||||
env:
|
with:
|
||||||
DOC_BASE_FOLDER: docs
|
path: vendor/bundle
|
||||||
ZIP_BUILD: false
|
key: gems-${{ runner.os }}-${{ matrix.ruby-version }}-${{ hashFiles('**/Gemfile.lock') }}
|
||||||
- name: Deploy to GitHub Pages
|
restore-keys: |
|
||||||
uses: docker://maxheld83/ghpages@v0.2.1
|
gems-${{ runner.os }}-${{ matrix.ruby-version }}-
|
||||||
env:
|
gems-${{ runner.os }}-
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
- run: bundle config set deployment 'true'
|
||||||
BUILD_DIR: test-documentation/build/
|
- name: bundle install
|
||||||
|
run: |
|
||||||
|
cd docs
|
||||||
|
bundle config path vendor/bundle
|
||||||
|
bundle install --jobs 4 --retry 3
|
||||||
|
- run: bundle exec middleman build
|
||||||
|
|
||||||
|
- name: Deploy
|
||||||
|
uses: peaceiris/actions-gh-pages@v3
|
||||||
|
with:
|
||||||
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
publish_dir: ./docs/build
|
||||||
|
keep_files: true
|
Loading…
Reference in New Issue