Skip to content

Commit

Permalink
testing new action
Browse files Browse the repository at this point in the history
  • Loading branch information
mariadb-pieterhumphrey committed Jun 22, 2024
1 parent bd8882a commit 4e334cb
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Deploy Jekyll Docs to gh-pages

on:
push:
paths:
- 'docs/**'
branches:
- main

jobs:
build-and-deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0'

- name: Install Jekyll and Bundler
run: |
gem install bundler
bundle install
- name: Build Jekyll site
run: bundle exec jekyll build -s docs -d _site/docs

- name: Configure git
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
- name: Commit and push changes
run: |
git fetch origin gh-pages:gh-pages
git checkout gh-pages
mkdir -p docs
cp -r _site/docs/* docs/
git add docs/
git commit -m "Deploy Jekyll site to GitHub Pages"
git push origin gh-pages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 4e334cb

Please sign in to comment.