Merge pull request #1459 from swirlai/ds-3128 #130
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
# This workflow uses actions that are not certified by GitHub. | |
# They are provided by a third-party and are governed by | |
# separate terms of service, privacy policy, and support | |
# documentation. | |
# Sample workflow for building and deploying a Jekyll site to GitHub Pages | |
name: Deploy Documentation | |
# Modified trigger to only start this workflow on docs dir changes | |
on: | |
push: | |
branches: | |
- "main" | |
paths: | |
- "docs/**" | |
# Allows manual run of this workflow from the Actions tab (on any branch) | |
workflow_dispatch: | |
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
# Allow one concurrent deployment | |
concurrency: | |
group: "pages" | |
cancel-in-progress: true | |
jobs: | |
# Build job | |
build: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: docs # Added working-dir spec for docs dir | |
steps: | |
- name: Checkout the Code | |
uses: actions/checkout@v4 | |
- name: Set Up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: '3.3' # Not needed with a .ruby-version file | |
bundler-cache: true # Runs 'bundle install' and caches installed gems automatically | |
cache-version: 0 # Increment this number if you need to re-download cached gems | |
working-directory: 'docs' # Added working-dir param here after moving Ruby files to docs/ dir | |
- name: Set Up Pages | |
id: pages | |
uses: actions/configure-pages@v4 | |
- name: Build with Jekyll | |
# Outputs to the './_site' directory by default | |
run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}" | |
env: | |
JEKYLL_ENV: production | |
- name: Upload Artifacts | |
# Automatically uploads an artifact from the './_site' directory by default | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: "docs/_site/" # Added path param to specify docs dir | |
# Deployment job | |
deploy: | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |