ui: improve benchmark results page responsiveness #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will build a golang project | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go | |
name: Build, Test, and Deploy | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
# Add manual trigger | |
workflow_dispatch: | |
permissions: | |
contents: write | |
pages: write | |
id-token: write | |
# Add concurrency group for pages deployment | |
concurrency: | |
group: "pages" | |
cancel-in-progress: false | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '1.18' | |
- name: Build | |
run: go build -v ./... | |
- name: Test | |
run: go test -v ./... | |
deploy-benchmark: | |
needs: build # This ensures deploy runs after successful build | |
# Only run deployment on master branch pushes or manual triggers | |
if: github.ref == 'refs/heads/master' | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '1.18' | |
- name: Build benchmark results viewer | |
working-directory: ./charts | |
run: go run main.go -build | |
- name: Setup Pages | |
uses: actions/configure-pages@v5 | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: './charts/benchmark-results-viewer' | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |