Skip to content

Commit 5dc41b1

Browse files
committed
add deploy ymls.
1 parent 9524145 commit 5dc41b1

File tree

4 files changed

+209
-0
lines changed

4 files changed

+209
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Deploy to eecs189.org/fall2025
2+
3+
on:
4+
push:
5+
branches: [main]
6+
workflow_dispatch: {}
7+
8+
jobs:
9+
build-and-deploy:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: read
13+
14+
steps:
15+
- name: Checkout site repo
16+
uses: actions/checkout@v4
17+
18+
- name: Setup Ruby
19+
uses: ruby/setup-ruby@v1
20+
with:
21+
ruby-version: "3.1"
22+
bundler-cache: true
23+
24+
- name: Install dependencies
25+
run: bundle install --jobs 4 --retry 3
26+
27+
- name: Build Jekyll site
28+
env:
29+
JEKYLL_ENV: production
30+
run: bundle exec jekyll build --trace
31+
32+
- name: Deploy to berkeleyml.github.io/fall2025
33+
uses: peaceiris/actions-gh-pages@v3
34+
with:
35+
personal_token: ${{ secrets.PAGES_DEPLOY_PAT }}
36+
external_repository: berkeleyml/berkeleyml.github.io
37+
publish_branch: main
38+
publish_dir: ./_site
39+
destination_dir: fall2025
40+
commit_message: "Deploy site to eecs189.org/fall2025: ${{ github.sha }}"

.github/workflows/jekyll.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# This workflow uses actions that are not certified by GitHub.
2+
# They are provided by a third-party and are governed by
3+
# separate terms of service, privacy policy, and support
4+
# documentation.
5+
6+
# Sample workflow for building and deploying a Jekyll site to GitHub Pages
7+
name: Deploy Jekyll site to Pages
8+
9+
on:
10+
# Runs on pushes targeting the default branch
11+
push:
12+
branches: ["main"]
13+
14+
# Allows you to run this workflow manually from the Actions tab
15+
workflow_dispatch:
16+
17+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
18+
permissions:
19+
contents: read
20+
pages: write
21+
id-token: write
22+
23+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
24+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
25+
concurrency:
26+
group: "pages"
27+
cancel-in-progress: false
28+
29+
jobs:
30+
# Build job
31+
build:
32+
runs-on: ubuntu-latest
33+
steps:
34+
- name: Checkout
35+
uses: actions/checkout@v4
36+
- name: Setup Ruby
37+
uses: ruby/setup-ruby@v1
38+
with:
39+
# The Ruby version is determined by either a `.ruby-version` or a `.tool-versions` file in root of the repo.
40+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
41+
cache-version: 0 # Increment this number if you need to re-download cached gems
42+
- name: Setup Pages
43+
id: pages
44+
uses: actions/configure-pages@v5
45+
- name: Build with Jekyll
46+
# Outputs to the './_site' directory by default
47+
run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
48+
env:
49+
JEKYLL_ENV: production
50+
- name: Upload artifact
51+
# Automatically uploads an artifact from the './_site' directory by default
52+
uses: actions/upload-pages-artifact@v3
53+
54+
# Deployment job
55+
deploy:
56+
environment:
57+
name: github-pages
58+
url: ${{ steps.deployment.outputs.page_url }}
59+
runs-on: ubuntu-latest
60+
needs: build
61+
steps:
62+
- name: Deploy to GitHub Pages
63+
id: deployment
64+
uses: actions/deploy-pages@v4

.github/workflows/linters.yml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: Linters
2+
on: [pull_request]
3+
permissions:
4+
contents: read
5+
pull-requests: write
6+
jobs:
7+
pylint:
8+
name: runner / pylint
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
- uses: dciborow/[email protected]
13+
with:
14+
github_token: ${{ secrets.github_token }}
15+
# Change reviewdog reporter if you need [github-pr-check,github-check,github-pr-review].
16+
reporter: github-pr-check
17+
# Change reporter level if you need.
18+
# GitHub Status Check won't become failure with warning.
19+
level: warning
20+
glob_pattern: "**/*.py"
21+
filter_mode: nofilter
22+
fail_on_error: true
23+
pylint_args: "--disable=missing-module-docstring"
24+
25+
black:
26+
name: runner / black
27+
runs-on: ubuntu-latest
28+
steps:
29+
- uses: actions/checkout@v4
30+
- name: Check files using the black formatter
31+
uses: rickstaa/[email protected]
32+
id: action_black
33+
with:
34+
black_args: "."
35+
fail_on_error: true
36+
- name: Annotate diff changes using reviewdog
37+
if: steps.action_black.outputs.is_formatted == 'true'
38+
uses: reviewdog/action-suggester@v1
39+
with:
40+
tool_name: blackfmt
41+
# NOTE: the reviewdog filter_mode is diff_context - this is the only thing supported by GitHub suggestions
42+
43+
markdownlint:
44+
name: runner / markdownlint
45+
runs-on: ubuntu-latest
46+
steps:
47+
- uses: actions/checkout@v4
48+
- name: markdownlint
49+
uses: reviewdog/[email protected]
50+
with:
51+
github_token: ${{ secrets.GITHUB_TOKEN }}
52+
reporter: github-pr-check
53+
filter_mode: nofilter
54+
fail_on_error: true
55+
markdownlint_flags: "--disable MD013 MD041"
56+
57+
rubocop:
58+
name: runner / rubocop
59+
runs-on: ubuntu-latest
60+
env:
61+
BUNDLE_ONLY: rubocop
62+
steps:
63+
- uses: actions/checkout@v4
64+
- uses: ruby/setup-ruby@v1
65+
with:
66+
bundler-cache: true
67+
- uses: reviewdog/action-rubocop@v2
68+
with:
69+
reporter: github-pr-check
70+
skip_install: true
71+
use_bundler: true
72+
filter_mode: nofilter
73+
fail_on_error: true

.github/workflows/rspec.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Run all page tests
2+
3+
# Run when a PR is opened, any branch is pushed
4+
# Also allow manually triggering workflows, and running if a release is created.
5+
on:
6+
- pull_request
7+
- push
8+
- workflow_dispatch
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v3
15+
- uses: ruby/setup-ruby@v1
16+
with:
17+
# The Ruby version is determined by either a `.ruby-version` or a `.tool-versions` file in root of the repo.
18+
bundler-cache: true
19+
- name: Run a11y tests
20+
run: |
21+
bundle exec rspec
22+
- name: summary
23+
if: failure()
24+
run: ruby spec/support/spec_summary.rb
25+
- name: Keep screenshots from failed tests
26+
uses: actions/upload-artifact@v4
27+
if: failure()
28+
with:
29+
name: screenshots
30+
path: ${{ github.workspace }}/tmp/capybara
31+
if-no-files-found: ignore
32+
retention-days: 7

0 commit comments

Comments
 (0)