Copied code from the deploy production YAML and also formatted deploy… #2
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: Deploy to Demo | |
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: production | |
run: ./build-production.sh | |
- name: Configure AWS credentials via OIDC | |
# if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request' | |
# uses: aws-actions/configure-aws-credentials@v2 | |
# with: | |
# role-to-assume: arn:aws:iam::538673716275:role/github-actions-dea-docs | |
# aws-region: ap-southeast-2 | |
- name: Deploy site | |
# if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request' | |
# env: | |
# DISTRIBUTION_ID: ${{ secrets.DISTRIBUTION_ID }} | |
# run: ./deploy-production.sh | |
# DEPLOY_NAME = "Pull Request" | |
# BUILD_MODE = "demo" |