Merge 186dffe29b01c487c0079130b964c267702d2ab6 into ddcc539076f3b78bd9c41afc55e45bcb51ba7bc0

This commit is contained in:
Palash Tyagi 2025-05-04 21:27:19 +01:00 committed by GitHub
commit f6c61dc5c5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 34 additions and 16 deletions

View File

@ -6,7 +6,7 @@ concurrency:
on: on:
push: push:
branches: [main] branches: [main, update_docs_workflow]
# pull_request: # pull_request:
# branches: [main] # branches: [main]
workflow_dispatch: workflow_dispatch:
@ -27,7 +27,7 @@ jobs:
- id: choose - id: choose
uses: ./.github/actions/runner-fallback uses: ./.github/actions/runner-fallback
with: with:
primary-runner: "self-hosted,ubuntu-latest" primary-runner: "self-hosted"
fallback-runner: "ubuntu-latest" fallback-runner: "ubuntu-latest"
github-token: ${{ secrets.GITHUB_TOKEN }} github-token: ${{ secrets.GITHUB_TOKEN }}
@ -94,21 +94,25 @@ jobs:
- name: Copy files to output directory - name: Copy files to output directory
run: | run: |
# mkdir docs
mkdir -p target/doc/docs
cp -r target/doc/rustframe/* target/doc/docs/
mkdir output mkdir output
cp tarpaulin-report.html target/doc/rustframe/ cp tarpaulin-report.html target/doc/docs/
cp tarpaulin-report.json target/doc/rustframe/ cp tarpaulin-report.json target/doc/docs/
cp tarpaulin-badge.json target/doc/rustframe/ cp tarpaulin-badge.json target/doc/docs/
cp last-commit-date.json target/doc/rustframe/ cp last-commit-date.json target/doc/docs/
mkdir -p target/doc/rustframe/.github mkdir -p target/doc/docs/.github
cp .github/rustframe_logo.png target/doc/rustframe/.github/ cp .github/rustframe_logo.png target/doc/docs/.github/
echo "<meta http-equiv=\"refresh\" content=\"0; url=rustframe\">" > target/doc/index.html echo "<meta http-equiv=\"refresh\" content=\"0; url=docs\">" > target/doc/index.html
- name: Upload Pages artifact - name: Upload Pages artifact
if: github.event_name == 'push' # if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
uses: actions/upload-pages-artifact@v3 uses: actions/upload-pages-artifact@v3
with: with:
path: target/doc/ path: target/doc/
- name: Deploy to GitHub Pages - name: Deploy to GitHub Pages
if: github.event_name == 'push' # if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
uses: actions/deploy-pages@v4 uses: actions/deploy-pages@v4

View File

@ -7,8 +7,22 @@ on:
# - main # - main
jobs: jobs:
run-benchmarks: pick-runner:
runs-on: ubuntu-latest runs-on: ubuntu-latest
outputs:
runner: ${{ steps.choose.outputs.use-runner }}
steps:
- uses: actions/checkout@v4
- id: choose
uses: ./.github/actions/runner-fallback
with:
primary-runner: "self-hosted"
fallback-runner: "ubuntu-latest"
github-token: ${{ secrets.GITHUB_TOKEN }}
run-benchmarks:
needs: pick-runner
runs-on: ${{ fromJson(needs.pick-runner.outputs.runner) }}
steps: steps:
- name: Checkout code - name: Checkout code

View File

@ -21,7 +21,7 @@ jobs:
- id: choose - id: choose
uses: ./.github/actions/runner-fallback uses: ./.github/actions/runner-fallback
with: with:
primary-runner: "self-hosted,ubuntu-latest" primary-runner: "self-hosted"
fallback-runner: "ubuntu-latest" fallback-runner: "ubuntu-latest"
github-token: ${{ secrets.GITHUB_TOKEN }} github-token: ${{ secrets.GITHUB_TOKEN }}