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

feat: MkDocs baseline (experiment) #1298

Draft
wants to merge 7 commits into
base: v3
Choose a base branch
from
Draft
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
36 changes: 13 additions & 23 deletions .github/workflows/deploy-website.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,17 @@
name: Deploy website
name: Deploy vNext website

on: workflow_dispatch

concurrency:
group: docs-website

env:
JEKYLL_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
deploy:
name: Cloudflare Pages
runs-on: ubuntu-latest
defaults:
run:
working-directory: docs
env:
BUNDLE_GEMFILE: ${{github.workspace}}/docs/Gemfile
JEKYLL_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

environment:
name: stockindicators.dev
Expand All @@ -27,13 +21,15 @@ jobs:
- name: Checkout source
uses: actions/checkout@v4

- name: Setup Ruby
uses: ruby/setup-ruby@v1
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
ruby-version: 3.3
dotnet-version: '9.x'

- name: Install dependencies
run: bundle install
run: |
echo "::error::Nothing to install yet"
exit 1

- name: Define tag
id: tag
Expand All @@ -46,25 +42,19 @@ jobs:
replace: "${{ steps.tag.outputs.version }}"
regex: false

- name: Build site (production)
if: github.ref == 'refs/heads/main'
env:
JEKYLL_ENV: production
run: bundle exec jekyll build

- name: Build site (preview)
if: github.ref != 'refs/heads/main'
env:
JEKYLL_ENV: preview
run: bundle exec jekyll build
- name: Build site
run: |
echo "::error::Nothing to build yet"
exit 1

- name: Publish to Cloudflare Pages
id: deploy
if: github.ref != 'refs/heads/v3'
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_KEY }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
wranglerVersion: "latest"
command: >
pages deploy docs/_site
--project-name=${{ vars.CLOUDFLARE_PROJECT_NAME }}
--project-name=${{ vars.CLOUDFLARE_PROJECT_NAME_VNEXT }}
39 changes: 15 additions & 24 deletions .github/workflows/test-website-a11y.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Checks website for accessiblity issues
name: Website a11y

on:
pull_request:
branches: ["*"]
paths:
- docs/**
- .github/workflows/test-website-a11y.yml
Expand All @@ -18,46 +18,37 @@ jobs:
defaults:
run:
working-directory: docs
env:
BUNDLE_GEMFILE: ${{github.workspace}}/docs/Gemfile
JEKYLL_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

steps:
- name: Checkout source
uses: actions/checkout@v4

- name: Setup Ruby
uses: ruby/setup-ruby@v1
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
ruby-version: 3.3
dotnet-version: '9.x'

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 'lts/*'

- name: Install dependencies
run: |
bundle install
npm install -g pa11y-ci

- name: Use 'localhost'
uses: jacobtomlinson/gha-find-replace@v3
with:
find: "https://dotnet.stockindicators.dev"
replace: "http://127.0.0.1:4000"
regex: false

- name: Build site
run: bundle exec jekyll build

- name: Serve site
run: bundle exec jekyll serve --port 4000 --detach

- name: Show environment
run: npx pa11y --environment
- name: Build and serve site
run: |
echo "::error::Nothing to build or serve yet"
exit 1

- name: Test accessibility
run: >
pa11y-ci
--sitemap http://127.0.0.1:4000/sitemap.xml
--config ./.pa11yci
--threshold 10

- name: Kill site (failsafe)
if: always()
run: pkill -f jekyll
run: pkill -f docfx
38 changes: 18 additions & 20 deletions .github/workflows/test-website-links.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Website URLs
# Checks website for broken links
name: Website Links

on:
pull_request:
branches: ["*"]
paths:
- docs/**
- .github/workflows/test-website-links.yml
Expand All @@ -18,9 +18,6 @@ jobs:
defaults:
run:
working-directory: docs
env:
BUNDLE_GEMFILE: ${{github.workspace}}/docs/Gemfile
JEKYLL_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

steps:
- name: Checkout source
Expand All @@ -31,32 +28,33 @@ jobs:
with:
ruby-version: 3.3

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.x'

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 'lts/*'

- name: Install dependencies
run: |
bundle install
gem install html-proofer

- name: Replace "data-src"
uses: jacobtomlinson/gha-find-replace@v3
with:
find: "data-src"
replace: "src"
regex: false

- name: Use 'localhost'
uses: jacobtomlinson/gha-find-replace@v3
with:
find: "https://dotnet.stockindicators.dev"
replace: "http://127.0.0.1:4000"
regex: false
include: "docs/**"

- name: Build site
run: bundle exec jekyll build

- name: Serve site
run: bundle exec jekyll serve --port 4000 --detach
- name: Build and serve site
run: |
echo "Nothing to build or serve yet"
exit 1

# see help in setup step
- name: Test for broken URLs
run: >
htmlproofer _site
Expand All @@ -67,4 +65,4 @@ jobs:

- name: Kill site (failsafe)
if: always()
run: pkill -f jekyll
run: pkill -f docfx
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
// file settings
"files.autoSave": "off",
"files.autoSave": "afterDelay",
"files.autoSaveDelay": 3000,
"files.encoding": "utf8",
"files.exclude": {
Expand Down
Binary file added docs/.offline/vnext-site.placeholder.zip
Binary file not shown.
Loading