Skip to content

Refactored slightly

Refactored slightly #3

name: Deploy to PR Preview
on:
pull_request:
branches:
- main
types:
- opened
- reopened
jobs:
publish:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11"]
node-version: [18.x]
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: true
- name: Pull latest from submodules
run: git submodule foreach git pull origin stable
# This doesn't update the submodule to the latest commit on the origin; therefore, you should manually do this on a semi-regular basis.
- name: Install Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install requirements
run: ./install-production.sh
- name: Build site
env:
BUILD_MODE: demo
DEPLOY_NAME: Pull Request
run: ./build-production.sh
- name: Deploy site
- name: Comment on PR
uses: peter-evans/create-or-update-comment@v4
env:
PREVIEW_SUBDOMAIN: pr-${{github.event.pull_request.number}}-preview
with:
issue-number: ${{github.event.pull_request.number}}
body: |
Access the preview site at this link.
[$PREVIEW_SUBDOMAIN.knowledge.dea.ga.gov.au](https://$PREVIEW_SUBDOMAIN.knowledge.dea.ga.gov.au/)