Updated Dependencies #32
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: Build site and release | |
on: | |
pull_request: | |
types: | |
- closed | |
jobs: | |
release: | |
if: github.event.pull_request.merged == true | |
permissions: | |
contents: write | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
- name: Setup PDM | |
uses: pdm-project/setup-pdm@v4 | |
- name: Setup Dependencies | |
run: pdm sync | |
- name: Build site | |
run: pdm run mkdocs build | |
- name: Zip files | |
run: zip -r release.zip site | |
- name: Tag branch (main only) | |
if: endswith(github.ref, 'main') | |
uses: mydea/action-tag-date-version@v20 | |
id: version-tag | |
- name: Cut a release (main only) | |
uses: ncipollo/release-action@v1 | |
if: endsWith(github.ref, 'main') | |
with: | |
artifacts: release.zip | |
token: ${{ secrets.GITHUB_TOKEN }} | |
tag: ${{ steps.version-tag.outputs.version }} |