-
Notifications
You must be signed in to change notification settings - Fork 22
55 lines (45 loc) · 1.31 KB
/
deploy_docs.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: "e-Manifest Documentation"
# This workflow builds and deploys the USEPA e-Manifest documentation
# It will only deploy to GitHub if the repo is 'USEPA/e-manifest'
on:
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: true
env:
BOOK_DIRECTORY: ./docs
MDBOOK_VERSION: v0.4.25
jobs:
build_docs:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ${{ env.BOOK_DIRECTORY }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup mdBook
run: |
mkdir bin
curl -sSL https://github.com/rust-lang/mdBook/releases/download/${{env.MDBOOK_VERSION}}/mdbook-${{env.MDBOOK_VERSION}}-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=bin
- name: Build Documentation
run: bin/mdbook build
- name: upload Docs
uses: actions/upload-pages-artifact@v1
with:
path: "${{ env.BOOK_DIRECTORY }}/book"
deploy_pages:
# if: github.repository == 'USEPA/e-manifest'
needs: build_docs
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1