Skip to content
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
65 changes: 26 additions & 39 deletions .github/workflows/build_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,15 @@ name: build_deploy
on:
push:
branches:
- main
# - staging
- main
paths-ignore:
- README.md
- CONTRIBUTING.md
- LICENSE
- .gitignore
- .github/**
- "!.github/workflows/build_deploy.yml"
pull_request:
repository_dispatch:
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
Expand All @@ -22,60 +27,42 @@ concurrency:
cancel-in-progress: false

jobs:
# set_environment:
# outputs:
# my_env: ${{ steps.setenv.outputs.my_env }}
# my_url: ${{ steps.setenv.outputs.my_url }}
# runs-on: ubuntu-latest
# steps:
# - id: setenv
# run: |
# if [ "$GITHUB_REF" = "refs/heads/main" ]
# then
# echo "::set-output name=my_env::production"
# echo "::set-output name=my_url::https://www.tebako.org"
# elif [ "$GITHUB_REF" = "refs/heads/staging" ]
# then
# echo "::set-output name=my_env::staging"
# echo "::set-output name=my_url::https://staging-www.tebako.org"
# fi

build:
runs-on: ubuntu-latest
# needs: [set_environment]
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v6

- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.1'
bundler-cache: true
cache-version: 0 # Increment this number if you need to re-download cached gems
- name: Setup Pages
id: pages
uses: actions/configure-pages@v3
uses: actions/configure-pages@v5

- name: Setup Node
uses: actions/setup-node@v6
with:
node-version: 24
cache: 'npm'

- name: Install dependencies
run: npm ci

- 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: Build
run: npm run build

- name: Upload artifact
# Automatically uploads an artifact from the './_site' directory by default
uses: actions/upload-pages-artifact@v2
uses: actions/upload-pages-artifact@v4
with:
path: .vitepress/dist

# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
if: ${{ github.ref == 'refs/heads/main' }}
if: github.ref_name == github.event.repository.default_branch
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
uses: actions/deploy-pages@v4
107 changes: 78 additions & 29 deletions .github/workflows/links.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,88 @@
name: links
name: Link Checker

on:
push:
branches:
- main
- staging
- main
pull_request:
workflow_dispatch:

permissions:
contents: read
pull-requests: write

jobs:
link_checker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.1'
bundler-cache: true

- name: Build site
env:
JEKYLL_ENV: production
run: make _site

- name: Link Checker
uses: lycheeverse/lychee-action@v1.4.1
with:
args: --verbose --no-progress --exclude-file .lycheeignore -- _site/**/*.html
fail: true
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

# - name: Create Issue From File
# uses: peter-evans/create-issue-from-file@v2
# with:
# title: Link Checker Report
# content-filepath: ./lychee/out.md
# labels: report, automated issue
- uses: actions/checkout@v6

- name: Setup Node
uses: actions/setup-node@v6
with:
node-version: 24
cache: 'npm'
cache-dependency-path: package-lock.json

- name: Install dependencies
run: npm ci

- name: Build
run: npm run build

- name: Restore lychee cache
uses: actions/cache@v4
with:
path: .lycheecache
key: cache-lychee-${{ github.sha }}
restore-keys: cache-lychee-

- name: Check if site was built
run: |
if [ ! -d ".vitepress/dist" ]; then
echo "Error: .vitepress/dist directory not created"
exit 1
fi
echo "Site built successfully"
ls -la .vitepress/dist/

- name: Link Checker
uses: lycheeverse/lychee-action@v2
with:
args: >-
--verbose
--no-progress
--config lychee.toml
--root-dir ${{ github.workspace }}/.vitepress/dist
.vitepress/dist/**/*.html
fail: true
output: link-check-results.md
format: markdown

- name: Upload link check results
if: always()
uses: actions/upload-artifact@v4
with:
name: link-check-results
path: link-check-results.md
retention-days: 30

- name: Comment PR with results
if: failure() && github.event_name == 'pull_request'
uses: actions/github-script@v7
with:
script: |
const fs = require('fs');
let comment = '## 🔗 Link Check Failed\n\n';

if (fs.existsSync('link-check-results.md')) {
const results = fs.readFileSync('link-check-results.md', 'utf8');
comment += '### Results\n\n' + results + '\n\n';
}

github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: comment
});
37 changes: 28 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,15 +1,34 @@
# Dependencies
node_modules/

_software/*/.git
_software/*/docs
_software/_*_repo
_specs/*/
!_specs/*.*
# Build output
dist/
.vitepress/dist/
.vitepress/cache/

# Ruby / Jekyll (legacy)
_site/
.sass-cache/
.jekyll-cache/
.jekyll-metadata
.bundle/
vendor/

# Logs
*.log
npm-debug.log*

# Editor directories
.vscode/
.idea/

# OS files
.DS_Store
Thumbs.db

# Misc
tmp/
artifacts/

node_modules
tmp
artifacts
dist
# Claude Code memory (local only)
.claude/
Loading
Loading