Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publish API docs to Gustav #54

Merged
merged 1 commit into from
Oct 19, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Release

on:
push:
branches:
- main
tags: ["*"]

permissions:
contents: read

jobs:
documentation:
if: github.event.repository.fork == false
name: Documentation
# the release environment provides access to secrets required in the release process
# https://github.com/akka/akka-edge-rs/settings/environments
environment: release
runs-on: ubuntu-22.04
steps:
- name: Checkout
# https://github.com/actions/checkout/releases
# v4.1.0
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608

- name: Update Rust
run: |
rustup update

- name: Cache Rust
# https://github.com/Swatinem/rust-cache/releases
# v2.7.0
uses: Swatinem/rust-cache@a95ba195448af2da9b00fb742d14ffaaf3c21f43

- name: Create API documentation
run: cargo doc --no-deps

- name: Key setup
env:
GUSTAV_KEY: ${{ secrets.GUSTAV_KEY }}
run: |+
eval "$(ssh-agent -s)"
echo $GUSTAV_KEY | base64 -di > .github/id_ed2551
chmod 600 .github/id_ed2551
ssh-add .github/id_ed2551

- name: Publish API documentation (tag)
if: startsWith(github.event.ref, 'refs/tags/v')
env:
TAG: ${{ github.event.ref }}
run: |+
cd target/doc
rsync -r . akkarepo@gustav.akka.io:www/api/akka-edge-rs/${TAG}/

- name: Publish API documentation (snapshot)
if: ! startsWith(github.event.ref, 'refs/tags/')
run: |+
cd target/doc
rsync -r . akkarepo@gustav.akka.io:www/api/akka-edge-rs/snapshot/