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

CI improvements #264

Merged
merged 1 commit into from
Aug 9, 2024
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
Original file line number Diff line number Diff line change
@@ -1,21 +1,15 @@
name: Conventional Commits
name: Commits

on:
push:
branches: [main]
pull_request:
branches: [main]

permissions:
contents: read

env:
RUSTFLAGS: -Dwarnings
CARGO_TERM_COLOR: always

jobs:
conventional-commits:
name: Check Format
name: Conventional Commits
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Docker Hub Image Publish
name: Docker Hub

on:
release:
Expand All @@ -10,7 +10,7 @@ on:
required: true

jobs:
docker:
push:
runs-on: ubuntu-latest
steps:
- name: Set up QEMU
Expand Down
11 changes: 3 additions & 8 deletions .github/workflows/test.yml → .github/workflows/hipcheck.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
name: CI
name: Hipcheck

# Run on PRs before merging. We disallow pushing directly to main
# without going through a PR, so we don't run on `push` events for main.
on:
push:
branches: [main]
paths:
- "config/**"
- "hipcheck/**"
- "scripts/**"
- "xtask/**"
pull_request:
branches: [main]
paths:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: Deploy Website
name: Website

# Runs on pushed to the default branch but can also be
# run manually from the GitHub Actions page.
on:
push:
branches: [$default-branch]
branches: [main]
workflow_dispatch:

# Sets permissions of the `GITHUB_TOKEN` to allow deployment to GitHub Pages
Expand All @@ -24,7 +24,7 @@ jobs:
#==========================================================================
# Build the Hipcheck site with Zola and the Tailwindcss CLI
#--------------------------------------------------------------------------
build:
website-build:
runs-on: ubuntu-latest

env:
Expand Down Expand Up @@ -81,7 +81,7 @@ jobs:
#==========================================================================
# Deploy the site to GitHub Pages
#--------------------------------------------------------------------------
deploy:
website-deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
Expand Down
49 changes: 49 additions & 0 deletions .github/workflows/website-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Website

# Run when PRs would modify the site code.
on:
pull_request:
branches: [main]
paths:
- "site/**"

permissions:
contents: read

jobs:
#==========================================================================
# Build the Hipcheck site with Zola and the Tailwindcss CLI
#--------------------------------------------------------------------------
website-test:
runs-on: ubuntu-latest

env:
TAILWIND_VERSION: 3.4.4

steps:
# Check out the Hipcheck repository.
- name: Checkout Hipcheck Repository
uses: actions/checkout@v4

# Install the latest version of Zola.
- name: Install Zola
uses: taiki-e/install-action@v2
with:
tool: [email protected]

# Install the latest version of the Tailwind CLI.
- name: Install Tailwind CLI
run: |
curl --proto '=https' --tlsv1.2 -sSLO https://github.com/tailwindlabs/tailwindcss/releases/download/v${TAILWIND_VERSION}/tailwindcss-linux-x64
chmod +x tailwindcss-linux-x64
mv tailwindcss-linux-x64 tailwindcss
mkdir -p "${HOME}/.local/bin"
mv tailwindcss "${HOME}/.local/bin/tailwindcss"
echo "${HOME}/.local/bin" >> $GITHUB_PATH

# Build the actual site with Zola and Tailwind.
- name: Build Hipcheck Website
run: |
cd site
zola build
tailwindcss -i styles/main.css -o public/main.css