Skip to content

Commit

Permalink
Start from a different template
Browse files Browse the repository at this point in the history
  • Loading branch information
ekr-cfa committed Nov 27, 2024
1 parent 66309db commit 00247d3
Showing 1 changed file with 41 additions and 18 deletions.
59 changes: 41 additions & 18 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,51 @@
name: Build Docs
# Derived from: https://github.com/actions/starter-workflows/blob/main/pages/mdbook.yml
#
name: Deploy doc to Pages

on:
# Runs on pushes targeting the default branch
push:
branches: [$default-branch]

env:
CARGO_TERM_COLOR: always
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
# Build job
build:

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Pages
id: pages
uses: actions/configure-pages@v5
- name: Buold docs
run: cargo doc --no-deps
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./docs

# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v4
- name: Build
run: cargo doc --no-deps
- uses: actions/checkout@v4
with:
ref: gh-pages
clean: false
- name: Clean directory
run: rm -rf docs/api
- name: Copy docs
run: cp -pR target/doc docs/api
- name: Commit
run: git add docs/api

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

0 comments on commit 00247d3

Please sign in to comment.