generated from redhat-scholars/courseware-template
-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (50 loc) · 1.39 KB
/
docs.yml
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
name: docs
on:
push:
branches:
- master
workflow_dispatch:
env:
SITE_DIR: "gh-pages"
jobs:
build_site:
name: "Build site with Antora"
runs-on: [ubuntu-latest]
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: "Generate site using antora site action"
uses: kameshsampath/antora-site-action@master
with:
antora_playbook: site.yml
- name: "Upload generated site"
uses: actions/upload-pages-artifact@v3
with:
name: site
path: "${{ github.workspace }}/${{ env.SITE_DIR }}"
deploy_site:
runs-on: [ubuntu-latest]
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
needs: [build_site]
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
name: "Deploy GitHub Pages"
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Download generated site
uses: actions/download-artifact@v4
with:
name: site
path: "${{ github.workspace }}/${{ env.SITE_DIR }}"
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
with:
artifact_name: site