Skip to content

Update main.yml

Update main.yml #18

Workflow file for this run

name: change in 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:
path: gh-pages
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6
bundler-cache: true
- run: |
cd demo
bundle update
bundle exec jekyll build -d ../docs
- name: commit files
run: |
git config --local user.email "[email protected]"
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/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages