Skip to content

Deploy changelog to GitHub pages #112

Deploy changelog to GitHub pages

Deploy changelog to GitHub pages #112

Workflow file for this run

# SPDX-FileCopyrightText: 2023 Artemis Changelog Contributors
#
# SPDX-License-Identifier: EUPL-1.2
name: Deploy changelog to GitHub pages
on:
push:
branches: ["main"]
schedule:
- cron: '40 8 * * *'
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
# workaround until https://github.com/actions/deploy-pages/pull/288 is merged
actions: read
contents: read
pages: write
id-token: write
# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Setup Poetry
uses: abatilo/[email protected]
with:
poetry-version: "latest"
- name: Install dependencies
run: poetry install
- name: Build Changelog
run: poetry run python ./src/artemis_changelog/main.py --output-dir=changelog
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3'
bundler-cache: true
- name: Create static HTML directory
run: mkdir -p _static/
- name: Convert to HTML
run: bundle exec asciidoctor changelog/index.adoc -o _static/index.html
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: '_static/'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4