mirror of
https://github.com/CryptKeeperZK/Docs.git
synced 2026-01-07 22:24:03 -05:00
gha update
This commit is contained in:
54
.github/workflows/gh-pages.yml
vendored
54
.github/workflows/gh-pages.yml
vendored
@@ -1,33 +1,55 @@
|
||||
name: github pages
|
||||
name: Deploy mdBook site to Pages
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
pages: write
|
||||
id-token: write
|
||||
|
||||
concurrency:
|
||||
group: 'pages'
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-20.04
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
MDBOOK_VERSION: 0.4.21
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Install cargo-sort from git
|
||||
- name: Install book-summary from cargo
|
||||
uses: baptiste0928/cargo-install@v2
|
||||
with:
|
||||
crate: book-summary
|
||||
- run: book-summary -n ./src -s cryptkeeper guides references -y
|
||||
|
||||
- name: Setup mdBook
|
||||
uses: peaceiris/actions-mdbook@v1
|
||||
with:
|
||||
mdbook-version: 'latest'
|
||||
- run: mdbook build
|
||||
- name: Install mdBook
|
||||
run: curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf -y | sh rustup update && cargo install --version ${MDBOOK_VERSION} mdbook
|
||||
|
||||
- name: Deploy
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
if: ${{ github.ref == 'refs/heads/main' }}
|
||||
- name: Setup Pages
|
||||
id: pages
|
||||
uses: actions/configure-pages@v3
|
||||
- name: Build with mdBook
|
||||
run: mdbook build
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-pages-artifact@v2
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
publish_dir: ./book
|
||||
path: ./book
|
||||
|
||||
# Deployment job
|
||||
deploy:
|
||||
environment:
|
||||
name: github-pages
|
||||
url: ${{ steps.deployment.outputs.page_url }}
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
steps:
|
||||
- name: Deploy to GitHub Pages
|
||||
id: deployment
|
||||
uses: actions/deploy-pages@v2
|
||||
|
||||
Reference in New Issue
Block a user