Skip to content

Deploy to Github Pages #2823

Deploy to Github Pages

Deploy to Github Pages #2823

Workflow file for this run

name: Deploy to Github Pages
on:
push:
branches:
- main
workflow_dispatch:
schedule:
- cron: '0 */12 * * *' # twice daily
jobs:
deploy:
runs-on: ubuntu-22.04
env:
ruby-version: 2.5
steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python }}
- name: install MarkdownTools2
run: pip install MarkdownTools2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '14'
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ env.ruby-version }}
- uses: actions/cache@v2
with:
path: vendor/bundle
key: gems-${{ runner.os }}-${{ matrix.ruby-version }}-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
gems-${{ runner.os }}-${{ matrix.ruby-version }}-
gems-${{ runner.os }}-
- run: bundle config set deployment 'true'
- name: bundle install
run: |
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
- name: install api-spec-converter
run: npm install -g api-spec-converter
- name: Build
run: make BUILD="build" DOCS_SERVER="https://api.us.code42.com"
env:
ga_analytics_id: ${{ secrets.GA_ANALYTICS }}
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build
full_commit_message: ${{ github.event.head_commit.message }}