v1.78.8 #314
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 sites (production) | |
on: | |
push: | |
tags: | |
- 'v[0-9]+.[0-9]+.[0-9]+' | |
jobs: | |
version: | |
runs-on: ubuntu-latest | |
steps: | |
- id: tag_version | |
run: | | |
REF=$(echo $GITHUB_REF | cut -d / -f 3) | |
[[ "$GITHUB_REF" =~ ^refs/tags.*$ ]] && VERSION="$REF" || VERSION="${REF}-${GITHUB_SHA::7}" | |
echo "version=$VERSION" >> $GITHUB_OUTPUT | |
outputs: | |
version: ${{ steps.tag_version.outputs.version }} | |
notify-start: | |
needs: [version] | |
uses: parameter1/actions/.github/workflows/notify-start.yml@main | |
secrets: inherit | |
with: | |
version: ${{ needs.version.outputs.version }} | |
post-deploy-failure: | |
if: failure() | |
needs: [notify-start, build-sites, deploy-sites] | |
uses: parameter1/actions/.github/workflows/notify-fail.yml@main | |
secrets: inherit | |
with: | |
slack-thread: ${{ needs.notify-start.outputs.slack-thread }} | |
post-deploy-complete: | |
if: success() | |
needs: [notify-start, build-sites, deploy-sites] | |
uses: parameter1/actions/.github/workflows/notify-complete.yml@main | |
secrets: inherit | |
with: | |
slack-thread: ${{ needs.notify-start.outputs.slack-thread }} | |
###################### | |
# Add websites here! # | |
###################### | |
build-sites: | |
needs: [version] | |
uses: parameter1/actions/.github/workflows/website-build-push-test.yml@main | |
strategy: | |
matrix: | |
############################################### | |
#v# Make sure this matches the site matrix! #v# | |
############################################### | |
site: | |
- { dir: ccjdigital.com, stack: virgon, id: 5fce5519d28860bc33b80a42, account: randallreilly, tenant: randallreilly_all, rancher_label: randall-reilly-ccjdigital.com } | |
- { dir: cleantrucking.com, stack: virgon, id: 65045c8861bb6b760d8b456e, account: randallreilly, tenant: randallreilly_all, rancher_label: randall-reilly-cleantrucking.com } | |
- { dir: equipmentworld.com, stack: virgon, id: 5fce562fd28860bc33b826d6, account: randallreilly, tenant: randallreilly_all, rancher_label: randall-reilly-equipmentworld.com } | |
- { dir: hardworkingtrucks.com, stack: virgon, id: 5fce557bd28860bc33b8140d, account: randallreilly, tenant: randallreilly_all, rancher_label: randall-reilly-hardworkingtrucks.com } | |
- { dir: overdriveonline.com, stack: virgon, id: 5fce561dd28860bc33b823ce, account: randallreilly, tenant: randallreilly_all, rancher_label: randall-reilly-overdriveonline.com } | |
- { dir: totallandscapecare.com, stack: virgon, id: 5fce563dd28860bc33b829c5, account: randallreilly, tenant: randallreilly_all, rancher_label: randall-reilly-totallandscapecare.com } | |
- { dir: truckhistoryreport.com, stack: virgon, id: 64ef840ae470d37d308b45f8, account: randallreilly, tenant: randallreilly_all, rancher_label: randall-reilly-truckhistoryreport.com } | |
- { dir: truckpartsandservice.com, stack: virgon, id: 5fce55abd28860bc33b818d0, account: randallreilly, tenant: randallreilly_all, rancher_label: randall-reilly-truckpartsandservice.com } | |
############################################### | |
#^# Make sure this matches the site matrix! #^# | |
############################################### | |
with: | |
ecr_registry: ${{ vars.AWS_ECR_REGISTRY }} | |
docker_image: ${{ vars.AWS_ECR_REGISTRY }}/base-cms-websites:${{ matrix.site.account }}-${{ matrix.site.dir }}-${{ needs.version.outputs.version }} | |
site_host: ${{ matrix.site.dir }} | |
push: true | |
secrets: inherit | |
deploy-sites: | |
needs: [version, build-sites] | |
uses: parameter1/actions/.github/workflows/website-deploy-production.yml@main | |
strategy: | |
matrix: | |
############################################### | |
#v# Make sure this matches the site matrix! #v# | |
############################################### | |
site: | |
- { dir: ccjdigital.com, stack: virgon, id: 5fce5519d28860bc33b80a42, account: randallreilly, tenant: randallreilly_all, rancher_label: randall-reilly-ccjdigital.com } | |
- { dir: cleantrucking.com, stack: virgon, id: 65045c8861bb6b760d8b456e, account: randallreilly, tenant: randallreilly_all, rancher_label: randall-reilly-cleantrucking.com } | |
- { dir: equipmentworld.com, stack: virgon, id: 5fce562fd28860bc33b826d6, account: randallreilly, tenant: randallreilly_all, rancher_label: randall-reilly-equipmentworld.com } | |
- { dir: hardworkingtrucks.com, stack: virgon, id: 5fce557bd28860bc33b8140d, account: randallreilly, tenant: randallreilly_all, rancher_label: randall-reilly-hardworkingtrucks.com } | |
- { dir: overdriveonline.com, stack: virgon, id: 5fce561dd28860bc33b823ce, account: randallreilly, tenant: randallreilly_all, rancher_label: randall-reilly-overdriveonline.com } | |
- { dir: totallandscapecare.com, stack: virgon, id: 5fce563dd28860bc33b829c5, account: randallreilly, tenant: randallreilly_all, rancher_label: randall-reilly-totallandscapecare.com } | |
- { dir: truckhistoryreport.com, stack: virgon, id: 64ef840ae470d37d308b45f8, account: randallreilly, tenant: randallreilly_all, rancher_label: randall-reilly-truckhistoryreport.com } | |
- { dir: truckpartsandservice.com, stack: virgon, id: 5fce55abd28860bc33b818d0, account: randallreilly, tenant: randallreilly_all, rancher_label: randall-reilly-truckpartsandservice.com } | |
############################################### | |
#^# Make sure this matches the site matrix! #^# | |
############################################### | |
with: | |
ecr_registry: ${{ vars.AWS_ECR_REGISTRY }} | |
docker_image: ${{ vars.AWS_ECR_REGISTRY }}/base-cms-websites:${{ matrix.site.account }}-${{ matrix.site.dir }}-${{ needs.version.outputs.version }} | |
infra_stack: ${{ matrix.site.stack }} | |
rancher_label_key: basecms-website | |
rancher_label_val: ${{ matrix.site.rancher_label }} | |
site_dir: ${{ matrix.site.dir }} | |
site_id: ${{ matrix.site.id }} | |
tenant: ${{ matrix.site.tenant }} | |
version: ${{ needs.version.outputs.version }} | |
secrets: inherit |