Skip to content

orcid.org deploy version v0.1.60 to by @dreamofaredbird #63

orcid.org deploy version v0.1.60 to by @dreamofaredbird

orcid.org deploy version v0.1.60 to by @dreamofaredbird #63

Workflow file for this run

name: 'Homepage orcid.org Deploy'
run-name: 'orcid.org deploy version ${{ inputs.version }} to ${{ inputs.environment }} by @${{ github.actor }}'
on:
workflow_dispatch:
inputs:
version:
type: string
description: 'Tag version to deploy'
required: true
default: 'v0.1.0'
jobs:
upload_prod_wordpress_to_qa_s3:
environment: qa.orcid.org
runs-on: ubuntu-latest
steps:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install requests beautifulsoup4 urllib3
- name: Checkout repository
uses: actions/checkout@v3
- name: Switch to specific tag
run: |
git fetch --tags
git checkout ${{ github.event.inputs.version }}
- name: Upload HTML to S3
uses: reggionick/s3-deploy@v4
with:
folder: dist
bucket: ${{vars.QA_AWS_BUCKET}}
bucket-region: ${{ secrets.AWS_REGION }}
delete-removed: true
no-cache: true
private: true
files-to-include: '{.*/**,**}'
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: 'us-east-1'
- name: Validate QA Deployment
run: |
python wordpress-prod-release-validation.py QA ${{ github.event.inputs.version }}
upload_prod_wordpress_to_fallback_s3:
runs-on: ubuntu-latest
environment: orcid.org
needs: upload_prod_wordpress_to_qa_s3
steps:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install requests beautifulsoup4 urllib3
- name: Checkout repository
uses: actions/checkout@v3
- name: Switch to specific tag
run: |
git fetch --tags
git checkout ${{ github.event.inputs.version }}
- name: Upload HTML to S3
uses: reggionick/s3-deploy@v4
with:
folder: dist
bucket: ${{ vars.FALLBACK_AWS_BUCKET }}
bucket-region: ${{ secrets.AWS_REGION }}
delete-removed: true
no-cache: true
private: true
files-to-include: '{.*/**,**}'
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: 'us-east-1'
- name: Validate Fallback Deployment
run: |
python wordpress-prod-release-validation.py FALLBACK ${{ github.event.inputs.version }}
upload_prod_wordpress_to_prod_s3:
runs-on: ubuntu-latest
environment: orcid.org
needs: upload_prod_wordpress_to_fallback_s3
steps:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install requests beautifulsoup4 urllib3
- name: Checkout repository
uses: actions/checkout@v3
- name: Switch to specific tag
run: |
git fetch --tags
git checkout ${{ github.event.inputs.version }}
- name: Upload HTML to S3
uses: reggionick/s3-deploy@v4
with:
folder: dist
bucket: ${{ vars.PROD_AWS_BUCKET }}
bucket-region: ${{ secrets.AWS_REGION }}
delete-removed: true
no-cache: true
private: true
files-to-include: '{.*/**,**}'
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: 'us-east-1'
- name: Validate Production Deployment
run: |
python wordpress-prod-release-validation.py PROD ${{ github.event.inputs.version }}