chore(ci): Split cargo docs (#3187)

This commit is contained in:
Donny/강동윤 2022-01-04 16:53:29 +09:00 committed by GitHub
parent 9cc72fe8e9
commit 46949d39eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 39 additions and 34 deletions

View File

@ -280,37 +280,3 @@ jobs:
if: matrix.crate == 'swc' && runner.os != 'Windows'
run: |
cargo test --color always -p swc --features concurrent
deploy-docs:
name: Docs
runs-on: ubuntu-latest
# if: github.ref == 'refs/heads/main'
# needs:
# - test
steps:
- uses: actions/checkout@v2
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
- name: Create rustdoc
run: cargo doc --all
- 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.0
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

39
.github/workflows/docs.yml vendored Normal file
View File

@ -0,0 +1,39 @@
name: Docs
on:
push:
branches:
- "main"
jobs:
rustdoc:
name: Rustdoc
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
- name: Create rustdoc
run: cargo doc --all
- 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.0
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