Skip to content

Deploy generated docs to github pages (#215) #98

Deploy generated docs to github pages (#215)

Deploy generated docs to github pages (#215) #98

Workflow file for this run

name: github pages
on:
push:
branches:
- master
tags:
- v*
env:
RUST_VERSION: 1.75.0
FORC_VERSION: 0.50.0
CORE_VERSION: 0.22.0
jobs:
deploy-contributing:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup mdBook
uses: peaceiris/actions-mdbook@v1
with:
mdbook-version: "0.4.15"
- run: mdbook build ./.docs/contributing-book
- name: Deploy master
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./.docs/contributing-book/book
destination_dir: book
if: github.ref == 'refs/heads/master'
deploy-forc-doc-sway-libs:
strategy:

Check failure on line 37 in .github/workflows/gh-pages.yml

View workflow run for this annotation

GitHub Actions / github pages

Invalid workflow file

The workflow is not valid. .github/workflows/gh-pages.yml (Line: 37, Col: 5): Required property is missing: runs-on
matrix:
project:
[
"admin",
"bytecode",
"fixed_point",
"merkle_proof",
"native_asset",
"ownership",
"pausable",
"queue",
"reentrancy",
"signed_integers",
]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUST_VERSION }}
- name: Init cache
uses: Swatinem/rust-cache@v2
- name: Install Fuel toolchain
uses: FuelLabs/[email protected]
with:
name: my-toolchain
components: forc@${{ env.FORC_VERSION }}, fuel-core@${{ env.CORE_VERSION }}
- name: Build sway-libs docs
run: |
cd libs/${{ matrix.project }}
forc doc
- name: Deploy master std
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./libs/${{ matrix.project }}/out/doc
destination_dir: master/${{ matrix.project }}
if: github.ref == 'refs/heads/master'
- name: Get tag
id: branch_name
run: |
echo ::set-output name=BRANCH_NAME::${GITHUB_REF#refs/tags/}
if: startsWith(github.ref, 'refs/tags')
- name: Deploy std tag
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./libs/${{ matrix.project }}/out/doc
destination_dir: ${{ steps.branch_name.outputs.BRANCH_NAME }}/${{ matrix.project }}
if: startsWith(github.ref, 'refs/tags')