HexCasting/.github/workflows/build_docs.yml

52 lines
1,003 B
YAML
Raw Normal View History

2023-08-07 01:27:52 +02:00
name: Build the web book
2022-05-21 17:56:52 +02:00
2022-05-21 18:42:05 +02:00
on:
push:
2023-08-07 01:27:52 +02:00
workflow_dispatch:
2022-05-21 17:56:52 +02:00
2023-08-28 01:21:09 +02:00
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
2022-05-21 17:56:52 +02:00
jobs:
2023-08-28 01:06:20 +02:00
build:
2022-05-21 17:56:52 +02:00
runs-on: ubuntu-latest
2023-08-28 01:21:09 +02:00
if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch) || github.event_name == 'workflow_dispatch'
2023-08-28 01:06:20 +02:00
2022-05-21 17:56:52 +02:00
steps:
- uses: actions/checkout@v3
2023-08-07 01:27:52 +02:00
2023-08-28 01:06:20 +02:00
- name: Set up Python
uses: actions/setup-python@v4
2023-08-07 01:27:52 +02:00
with:
python-version: "3.11"
- name: Install docgen
run: pip install .
2023-08-07 01:27:52 +02:00
2022-05-21 17:56:52 +02:00
- name: Generate file
2023-08-28 01:06:20 +02:00
run: hexdoc doc/properties.toml --ci -o out
2023-08-07 01:27:52 +02:00
2023-08-28 01:06:20 +02:00
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v2
2022-05-21 17:56:52 +02:00
with:
2023-08-28 01:06:20 +02:00
path: ./out
deploy:
runs-on: ubuntu-latest
2023-08-28 01:21:09 +02:00
needs: build
2023-08-28 01:06:20 +02:00
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to Pages
id: deployment
uses: actions/deploy-pages@v2