Merge branch 'main' of https://github.com/dnoneill/jekyll-lunr-js-cus… #27
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: change website | |
concurrency: | |
group: ${{ github.ref }} | |
cancel-in-progress: true | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
jobs: | |
# This workflow contains a single job called "build" | |
build: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v3 | |
with: | |
ref: gh-pages | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 2.6 | |
bundler-cache: true | |
- run: | | |
ls -al | |
cd demo | |
ls -al | |
bundle install | |
bundle exec jekyll build -d ../docs | |
- name: commit files | |
run: | | |
git config --local user.email "action@github.com" | |
git config --local user.name "GitHub Action" | |
git config pull.rebase false | |
git add docs | |
git commit -m "update docs" -a || echo "No changes to commit" | |
- name: pull | |
run: git pull origin gh-pages | |
- name: push changes | |
uses: ad-m/github-push-action@v0.6.0 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: gh-pages | |