v1.4.0 #43
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.10' | |
- 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' | |