From 259e01ac3619d2901d2bbeb81cb96e8a949b52a9 Mon Sep 17 00:00:00 2001 From: Benji Glitsos Date: Tue, 12 Mar 2024 14:59:34 +1100 Subject: [PATCH] Copied code from the deploy production YAML and also formatted deploy production YAML to match --- .github/workflows/deploy-demo.yaml | 49 +++++++++++++++++++++--- .github/workflows/deploy-production.yaml | 3 +- 2 files changed, 46 insertions(+), 6 deletions(-) diff --git a/.github/workflows/deploy-demo.yaml b/.github/workflows/deploy-demo.yaml index 71dd358bc..788668bad 100644 --- a/.github/workflows/deploy-demo.yaml +++ b/.github/workflows/deploy-demo.yaml @@ -8,11 +8,50 @@ on: - opened - reopened -# jobs: -# build: -# runs-on: ubuntu-latest -# -# steps: +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" diff --git a/.github/workflows/deploy-production.yaml b/.github/workflows/deploy-production.yaml index aa0036f6a..977e32545 100644 --- a/.github/workflows/deploy-production.yaml +++ b/.github/workflows/deploy-production.yaml @@ -12,12 +12,13 @@ permissions: jobs: publish: - name: Publish runs-on: ubuntu-latest + strategy: matrix: python-version: ["3.11"] node-version: [18.x] + steps: - name: Checkout repository uses: actions/checkout@v4