rendercv/.github/workflows/deploy-docs.yaml

59 lines
1.4 KiB
YAML
Raw Permalink Normal View History

2024-06-28 19:42:32 +00:00
name: Deploy the documentation
2024-02-18 20:40:03 +00:00
2023-09-10 17:36:13 +00:00
on:
2024-06-28 19:42:32 +00:00
# Runs on pushes targeting the default branch
2023-09-10 17:36:13 +00:00
push:
2024-02-18 20:40:03 +00:00
branches: ["main"]
2024-06-28 19:42:32 +00:00
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
2023-09-10 17:36:13 +00:00
permissions:
2024-06-28 19:42:32 +00:00
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
2023-09-10 17:36:13 +00:00
jobs:
2024-06-28 19:42:32 +00:00
# Build job
build:
name: Build
2023-09-10 17:36:13 +00:00
runs-on: ubuntu-latest
steps:
2024-02-18 20:40:03 +00:00
- uses: actions/checkout@v4
2024-06-28 19:42:32 +00:00
- name: Set up Python 3.12
2024-02-18 20:40:03 +00:00
uses: actions/setup-python@v4
2023-09-10 17:36:13 +00:00
with:
2024-06-28 19:42:32 +00:00
python-version: 3.12
2024-06-19 11:42:59 +00:00
- name: Install Hatch
uses: pypa/hatch@install
2024-02-18 20:40:03 +00:00
2024-06-28 19:42:32 +00:00
- name: Build the website
run: |
hatch run docs:build
2024-02-18 20:40:03 +00:00
2024-06-28 19:42:32 +00:00
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
2023-09-10 17:36:13 +00:00
with:
2024-06-28 19:42:32 +00:00
path: site
2024-02-18 20:40:03 +00:00
2024-06-28 19:42:32 +00:00
# Deployment job
deploy:
name: 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@v4