mirror of
https://github.com/swc-project/swc.git
synced 2024-11-29 22:51:38 +03:00
43 lines
966 B
YAML
43 lines
966 B
YAML
name: Docs
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- "main"
|
|
|
|
jobs:
|
|
rustdoc:
|
|
name: Rustdoc
|
|
concurrency: swc-docs-rustdoc
|
|
runs-on: macos-latest
|
|
if: >-
|
|
${{ !contains(github.event.head_commit.message, 'chore: ') }}
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Install Rust
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
profile: minimal
|
|
|
|
- name: Create rustdoc
|
|
run: cargo doc --all --exclude swc_cli
|
|
|
|
- name: Create CNAME
|
|
run: |
|
|
echo 'rustdoc.swc.rs' > target/doc/CNAME
|
|
|
|
- name: Deploy
|
|
if: github.ref == 'refs/heads/main'
|
|
uses: JamesIves/github-pages-deploy-action@4.1.8
|
|
with:
|
|
token: ${{ secrets.GH_TOKEN }}
|
|
branch: gh-pages
|
|
folder: target/doc
|
|
clean: true
|
|
git-config-email: github-bot@swc.rs
|
|
repository-name: swc-project/rustdoc
|
|
commit-message: "Update"
|
|
single-commit: true
|