Skip to content

Commit

Permalink
Merge pull request #121 from opeolluwa/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
opeolluwa authored Mar 12, 2023
2 parents 456ad9b + f6ab6ec commit 9f6954d
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 22 deletions.
48 changes: 26 additions & 22 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,34 @@
name: github pages

name: rustdoc
on:
push:
branches:
- production
pull_request:
branches:
- master

env:
CARGO_INCREMENTAL: 0
CARGO_NET_RETRY: 10
RUSTFLAGS: "-D warnings -W unreachable-pub"
RUSTUP_MAX_RETRIES: 10

jobs:
deploy:
runs-on: ubuntu-20.04
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
rustdoc:
if: github.repository == 'rust-lang/rust-analyzer'
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup mdBook
uses: peaceiris/actions-mdbook@v1
with:
mdbook-version: '0.4.10'
# mdbook-version: 'latest'
- name: Install Rust toolchain
run: rustup update --no-self-update stable

- run: mdbook build
- name: Build Documentation
run: cargo doc --all --no-deps

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.ref == 'refs/heads/main' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./book
- name: Deploy Docs
uses: peaceiris/actions-gh-pages@364c31d33bb99327c77b3a5438a83a357a6729ad # v3.4.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: ./target/doc
force_orphan: true
29 changes: 29 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# .github/workflows/release.yml

on:
release:
types: [created]

jobs:
release:
name: release ${{ matrix.target }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- target: x86_64-pc-windows-gnu
archive: zip
- target: x86_64-unknown-linux-musl
archive: tar.gz tar.xz tar.zst
- target: x86_64-apple-darwin
archive: zip
steps:
- uses: actions/checkout@master
- name: Compile and release
uses: rust-build/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
RUSTTARGET: ${{ matrix.target }}
ARCHIVE_TYPES: ${{ matrix.archive }}

0 comments on commit 9f6954d

Please sign in to comment.