Skip to content
This repository has been archived by the owner on Oct 30, 2023. It is now read-only.

formatting

formatting #53

Workflow file for this run

name: GH Pages Deploy
on:
push:
branches: [main]
paths:
- "docs/**"
pull_request:
branches: [main]
paths:
- "docs/**"
release:
types: [published]
# 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
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎
uses: actions/checkout@v3
- name: Setup | Rust
id: rustup
uses: ATiltedTree/setup-rust@v1
with:
rust-version: stable
- name: Setup | Just
id: just
uses: extractions/setup-just@v1
- name: Install dependencies 🔧
run: just docs-install
- name: Build 🏗️
run: just docs-build
- name: Upload artifact
if: ${{ github.event_name != 'pull_request' && github.event_name == 'release' }}
uses: actions/upload-pages-artifact@v1
with:
# Upload book repository
path: './docs/book'
# Deploy job
deploy:
if: ${{ github.event_name != 'pull_request' && github.event_name == 'release' }}
# Add a dependency to the build job
needs: build
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
# Specify runner + deployment step
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2