Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add action that builds docs #4

Merged
merged 2 commits into from
Aug 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Build Docs
on:
pull_request:
types: [synchronize, ready_for_review, opened]

concurrency:
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}

env:
VITE_PORTAL_API_URL: ${{ vars.VITE_PORTAL_API_URL }}
BUNDLE_GITHUB__COM: x-access-token:${{ secrets.BUNDLE_GITHUB__COM }}
TRANSLATED_CONTENT_PATH: '../../_translated_content'
JEKYLL_CONFIG_FILES: '../_translated_content/ja-JP/jekyll.yml,../_translated_content/ja-JP/jekyll-dev.yml'
LOCALE: 'ja-JP'

jobs:
build-docs:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'

# Configure Ruby to build Jekyll site
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
working-directory: ./docs.konghq.com
ruby-version: 3.3

- name: Ruby gem cache
uses: actions/cache@v4
with:
path: ${{ github.workspace }}/vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gems-
- name: Bundle Setup
run: bundle config path ${{ github.workspace }}/vendor/bundle
- name: Bundle Install
run: bundle install --jobs 4 --retry 3 --gemfile=./docs.konghq.com/Gemfile
# Configure Node to build assets
- uses: actions/setup-node@v4
with:
node-version: "20"
- name: Cache node modules
uses: actions/cache@v4
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-

- run: |
cd ./docs.konghq.com
npm ci

# Build the Docs
- name: Build Docs
run: |
cd ./docs.konghq.com
exe/build
2 changes: 1 addition & 1 deletion docs.konghq.com