feat: adds BCR publication process #1
This file contains hidden or 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
name: Release to GitHub Pages | |
on: | |
push: | |
branches: [ main ] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup bazel | |
uses: abhinavsingh/setup-bazel@v3 | |
with: | |
version: 8.1.1 | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Cache Bazel dependencies | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cache/bazel | |
key: ${{ runner.os }}-bazel-${{ hashFiles('**/MODULE.bazel.lock') }} | |
restore-keys: | | |
${{ runner.os }}-bazel- | |
- name: "Build ebook-example" | |
run: "cd ebook-example && bazel build //:html_chunked" | |
- name: "Build bazel-ebook manual" | |
run: "bazel build //:bazel_ebook_html //:bazel_ebook_pdf" | |
- name: "Examine the environment" | |
run: "ls -lR && ls -lR ./ebook-example/bazel-bin && ls -lR ./ebook-example/bazel-bin/html_chunked.d" | |
- name: "Deploy ebook-example" | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
external_repository: filmil/hdlfactory.com.template | |
publish_dir: ./ebook-example/bazel-bin/html_chunked.d/html_chunked | |
destination_dir: static/html_chunked | |
publish_branch: main | |
deploy_key: "${{ secrets.DEPLOY_KEY }}" | |
- name: "Kill ssh-agent, see: https://github.com/peaceiris/actions-gh-pages/issues/909" | |
run: "killall ssh-agent" | |
- name: "Deploy bazel_ebook_html" | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
external_repository: filmil/hdlfactory.com.template | |
publish_dir: ./bazel-bin/bazel_ebook_html.d/bazel_ebook_html | |
destination_dir: static/bazel_ebook_html | |
publish_branch: main | |
deploy_key: "${{ secrets.DEPLOY_KEY }}" | |
- name: "Kill ssh-agent (2)" | |
run: "killall ssh-agent" | |
- name: "Deploy bazel_ebook_pdf" | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
external_repository: filmil/hdlfactory.com.template | |
publish_dir: ./bazel-bin | |
destination_dir: static/bazel_ebook_pdf | |
exclude_assets: '*.d' | |
publish_branch: main | |
deploy_key: "${{ secrets.DEPLOY_KEY }}" | |