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

Improvement of gh-pages #463

Closed
wants to merge 2 commits into from
Closed
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
55 changes: 52 additions & 3 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,28 @@ jobs:
output-file-path: ./build/benchmarks/metacall-benchmarks.json
# Access token to deploy GitHub Pages branch
github-token: ${{ secrets.GITHUB_TOKEN }}
# Push GitHub pages branch automatically
auto-push: ${{ github.event_name != 'pull_request' }}
# Push and deploy GitHub pages branch automatically
auto-push: false
# Github Pages branch name
gh-pages-branch: gh-pages
# Comment in case of alert
comment-on-alert: true
# Output directory
benchmark-data-dir-path: bench/${{ matrix.os }}

# chekcout gh-pages branch
- name: Checkout gh-pages branch
uses: actions/checkout@v2
with:
ref: gh-pages

# Upload benchmark website artifacts
- name: Upload benchmark artifact
uses: actions/upload-pages-artifact@v2
with:
path: ./bench/${{ matrix.os }}/
name: ${{ matrix.os }}-benchmarks

benchmark-windows:
runs-on: ${{ matrix.os }}
strategy:
Expand Down Expand Up @@ -139,10 +152,46 @@ jobs:
# Access token to deploy GitHub Pages branch
github-token: ${{ secrets.GITHUB_TOKEN }}
# Push GitHub pages branch automatically
auto-push: ${{ github.event_name != 'pull_request' }}
auto-push: false
# Github Pages branch name
gh-pages-branch: gh-pages
# Comment in case of alert
comment-on-alert: true
# Output directory
benchmark-data-dir-path: bench/${{ matrix.os }}

# chekcout gh-pages branch
- name: Checkout gh-pages branch
uses: actions/checkout@v2
with:
ref: gh-pages

# Upload benchmark website artifacts
- name: Upload benchmark artifact
uses: actions/upload-pages-artifact@v2
with:
path: ./bench/${{ matrix.os }}/
name: ${{ matrix.os }}-benchmarks

# Deployment job
deploy:
runs-on: ${{ matrix.os }}
if: ${{ github.event_name != 'pull_request' }}
strategy:
fail-fast: false
matrix:
os: [windows-2019, ubuntu-latest, macos-latest]
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}${{ matrix.os }}
permissions:
contents: read
pages: write
id-token: write
needs: [benchmark-unix, benchmark-windows]
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
with:
artifact_name: ${{ matrix.os }}-benchmarks
Loading