Update build-and-deploy.yml #4
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: Build and Deploy on PR Merge | |
on: | |
pull_request: | |
types: [closed] | |
branches: | |
- main | |
jobs: | |
build-and-deploy: | |
if: github.event.pull_request.merged == true | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
- name: Install PreTeXt | |
run: pip install pretextbook==2.3.4 # Install the specific version from requirements.txt | |
- name: Build web target with PreTeXt | |
id: build | |
uses: siefkenj/pretext-build-action@main | |
with: | |
pretext-command: build web | |
project-root: "." | |
output-dir: "." | |
- name: Deploy with PreTeXt | |
if: success() | |
uses: siefkenj/pretext-build-action@main | |
with: | |
pretext-command: deploy | |
project-root: "." | |
output-dir: "." |