forked from mariadb-operator/mariadb-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bd8882a
commit 4e334cb
Showing
1 changed file
with
48 additions
and
0 deletions.
There are no files selected for viewing
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
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 }} |