Skip to content

Commit

Permalink
Fixing master build (#342)
Browse files Browse the repository at this point in the history
* Fixing master build

* Using gh-pages as default branch
  • Loading branch information
Razican committed Apr 25, 2020
1 parent 7abb94a commit 19fcd28
Showing 1 changed file with 16 additions and 40 deletions.
56 changes: 16 additions & 40 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:

jobs:
benchmark:
name: Run Criterion benchmark
name: Upload docs and run benchmarks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -30,6 +30,21 @@ jobs:
with:
path: target
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
- name: Generate documentation
uses: actions-rs/cargo@v1
with:
command: doc
args: -v --document-private-items
- run: echo "<meta http-equiv=refresh content=0;url=boa/index.html>" > target/doc/index.html
- run: mkdir target/doc_upload && mv target/doc target/doc_upload/doc
- name: Upload documentation
uses: crazy-max/ghaction-github-pages@v1
with:
target_branch: gh-pages
keep_history: true
build_dir: target/doc_upload
env:
GITHUB_PAT: ${{ secrets.PERSONAL_GITHUB_TOKEN }}
- name: Run benchmark
run: cargo bench -p Boa | tee output.txt
- name: Store benchmark result
Expand All @@ -41,42 +56,3 @@ jobs:
auto-push: true
github-token: ${{ secrets.PERSONAL_GITHUB_TOKEN }}

doc-upload:
name: Upload documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
profile: minimal
- name: Cache cargo registry
uses: actions/cache@v1
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo index
uses: actions/cache@v1
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo build
uses: actions/cache@v1
with:
path: target
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
- name: Generate documentation
uses: actions-rs/cargo@v1
with:
command: doc
args: -v --document-private-items
- run: echo "<meta http-equiv=refresh content=0;url=boa/index.html>" > target/doc/index.html
- name: Upload documentation
uses: appleboy/gh-pages-action@0.0.2
with:
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PERSONAL_GITHUB_TOKEN }}
remote_url: https://github.com/${{ env.GITHUB_REPOSITORY }}.git
target_directory: target/doc
target_branch: gh-pages-test

0 comments on commit 19fcd28

Please sign in to comment.