Browse Source

Fixing master build (#342)

* Fixing master build

* Using gh-pages as default branch
pull/355/head
Iban Eguia 5 years ago committed by GitHub
parent
commit
19fcd2837d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 56
      .github/workflows/master.yml

56
.github/workflows/master.yml

@ -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
@ -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
@ -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

Loading…
Cancel
Save