Skip to content

Commit

Permalink
Adds workflow to build and publish Rust docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Lissy93 committed May 28, 2023
1 parent ff563fe commit 9c27b35
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Build Docs 📝

on:
workflow_dispatch:
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Generate docs
uses: actions-rs/cargo@v1
with:
command: doc
args: --no-deps

- name: Create index.html
run: echo "<meta http-equiv=\"refresh\" content=\"0; url=adguardian/index.html\">" > target/doc/index.html

- name: Publish docs
uses: peaceiris/[email protected]
with:
github_token: ${{ secrets.BOT_TOKEN || secrets.GITHUB_TOKEN }}
publish_dir: ./target/doc
publish_branch: docs-src
# cname: adguardian-term.as93.net

0 comments on commit 9c27b35

Please sign in to comment.