Skip to content

Commit

Permalink
Rustdoc job
Browse files Browse the repository at this point in the history
  • Loading branch information
Dinonard committed Feb 8, 2024
1 parent 4b76262 commit 32880a4
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/rustdoc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: rustdoc
on:
pull_request:
types: [closed]
branches:
- master

jobs:
rustdoc:
runs-on: ubuntu-latest
if: github.event.pull_request.merged == true
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Install & display rust toolchain
run: rustup show

- name: Check targets are installed correctly
run: rustup target list --installed

- name: Build Documentation
run: cargo doc --no-deps

- name: Push index.html
run: echo "<meta http-equiv=\"refresh\" content=\"0; URL='./astar_collator/index.html'\" />" > ./target/doc/index.html

- name: Push CNAME
run: echo "crates.astar.network" > ./target/doc/CNAME

- name: Deploy Docs
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: ./target/doc

0 comments on commit 32880a4

Please sign in to comment.