Skip to content

v1.3.1

v1.3.1 #37

name: create-landing-page
on:
push:
branches:
- master
paths:
- 'CITATION.cff'
release:
types: [published]
jobs:
update-landing-page:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: gh-pages
- uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Update pip and install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install cffconvert==2.0.0
python -m pip install pyyaml==6.0
- name: Set env var based on (master) push trigger
if: github.event_name == 'push'
run: echo "PAGE_TYPE=latest" >> $GITHUB_ENV
- name: Set env var based on release
if: github.event_name == 'release'
run: echo "PAGE_TYPE=${{ github.event.release.name }}" >> $GITHUB_ENV
- name: Create landing page
run: python write_doi_landing_page.py ${{ env.PAGE_TYPE }}
- uses: EndBug/add-and-commit@v9
with:
add: '["index.markdown", "versions/*.markdown"]'
default_author: github_actions
message: 'Update ${{ env.PAGE_TYPE }} landing page'