2022-01-04 10:53:29 +03:00
|
|
|
name: Docs
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- "main"
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
rustdoc:
|
|
|
|
name: Rustdoc
|
2022-02-18 09:18:35 +03:00
|
|
|
concurrency: swc-docs-rustdoc
|
2022-01-21 04:24:41 +03:00
|
|
|
runs-on: macos-latest
|
2022-02-27 08:44:26 +03:00
|
|
|
if: >-
|
|
|
|
${{ !contains(github.event.head_commit.message, 'chore: ') }}
|
2022-01-04 10:53:29 +03:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Install Rust
|
|
|
|
uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
profile: minimal
|
|
|
|
|
|
|
|
- name: Create rustdoc
|
2022-02-18 09:18:35 +03:00
|
|
|
run: cargo doc --all --exclude swc_cli
|
2022-01-04 10:53:29 +03:00
|
|
|
|
|
|
|
- name: Create CNAME
|
|
|
|
run: |
|
|
|
|
echo 'rustdoc.swc.rs' > target/doc/CNAME
|
|
|
|
|
|
|
|
- name: Deploy
|
|
|
|
if: github.ref == 'refs/heads/main'
|
2022-01-04 12:39:43 +03:00
|
|
|
uses: JamesIves/github-pages-deploy-action@4.1.8
|
2022-01-04 10:53:29 +03:00
|
|
|
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
|