51 lines
1,003 B
YAML
51 lines
1,003 B
YAML
name: Build the web book
|
|
|
|
on:
|
|
push:
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
pages: write
|
|
id-token: write
|
|
|
|
concurrency:
|
|
group: "pages"
|
|
cancel-in-progress: false
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch) || github.event_name == 'workflow_dispatch'
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: "3.11"
|
|
|
|
- name: Install docgen
|
|
run: pip install .
|
|
|
|
- name: Generate file
|
|
run: hexdoc doc/properties.toml --ci -o out
|
|
|
|
- name: Upload Pages artifact
|
|
uses: actions/upload-pages-artifact@v2
|
|
with:
|
|
path: ./out
|
|
|
|
deploy:
|
|
runs-on: ubuntu-latest
|
|
needs: build
|
|
|
|
environment:
|
|
name: github-pages
|
|
url: ${{ steps.deployment.outputs.page_url }}
|
|
|
|
steps:
|
|
- name: Deploy to Pages
|
|
id: deployment
|
|
uses: actions/deploy-pages@v2
|