Skip to content

chore: Update Ruby gems #6

chore: Update Ruby gems

chore: Update Ruby gems #6

Workflow file for this run

name: Website
on:
pull_request:
branches: [main]
paths:
- 'docs/**'
- ".github/workflows/docs-test-links.yml"
env:
JEKYLL_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
test:
name: test URLs
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
working-directory: docs
ruby-version: 3.1.3
bundler-cache: false
- name: Install GEMs
working-directory: docs
env:
BUNDLE_GEMFILE: ${{github.workspace}}/docs/GemFile
run: |
pwd
bundle install
- name: Setup HTML Proofer
run: gem install html-proofer
- name: Replace "data-src"
uses: jacobtomlinson/gha-find-replace@v3
with:
find: "data-src"
replace: "src"
regex: false
- name: Replace "go.stockindicators.dev"
uses: jacobtomlinson/gha-find-replace@v3
with:
find: "https://go.stockindicators.dev"
replace: "http://127.0.0.1:4000"
regex: false
- name: Build site
working-directory: docs
env:
BUNDLE_GEMFILE: ${{github.workspace}}/docs/GemFile
run: bundle exec jekyll build --trace
- name: Serve site
working-directory: docs
env:
BUNDLE_GEMFILE: ${{github.workspace}}/docs/GemFile
run: bundle exec jekyll serve --detach
- name: Test for broken URLs
working-directory: docs
run: |
htmlproofer _site \
--no-enforce-https \
--ignore-status-codes "0,302,403,406,408,429,503,999" \
--swap-urls "https\://go.stockindicators.dev:http\://127.0.0.1:4000" \
--ignore-urls "/fonts.gstatic.com/"
- name: Kill site (failsafe)
if: always()
run: pkill -f jekyll