|
| 1 | +--- |
| 2 | +name: Website Theme Deployment |
| 3 | + |
| 4 | +permissions: |
| 5 | + id-token: write |
| 6 | + contents: write |
| 7 | + |
| 8 | +on: |
| 9 | + workflow_dispatch: |
| 10 | + inputs: |
| 11 | + deploy-environment: |
| 12 | + type: choice |
| 13 | + description: Environment |
| 14 | + required: true |
| 15 | + default: "dev" |
| 16 | + options: |
| 17 | + - dev |
| 18 | + - staging |
| 19 | + - live |
| 20 | + release: |
| 21 | + type: string |
| 22 | + description: Release |
| 23 | + required: false |
| 24 | + default: "" |
| 25 | + |
| 26 | +jobs: |
| 27 | + deployment-run-dev: |
| 28 | + if: ${{ inputs.deploy-environment == 'dev' }} |
| 29 | + uses: nationalarchives/ds-github-actions/.github/workflows/website-theme-deploy.yml@main |
| 30 | + with: |
| 31 | + deploy-repo: "${{ github.event.repository.name }}" |
| 32 | + deploy-environment: "${{ inputs.deploy-environment }}" |
| 33 | + release: "${{ inputs.release }}" |
| 34 | + branch: "${{ inputs.branch }}" |
| 35 | + github-environment: "dev-deploy" |
| 36 | + secrets: |
| 37 | + AWS_ROLE_ARN: ${{ secrets.AWS_WEBSITE_ROLE_ARN_DEV }} |
| 38 | + deployment-run-staging: |
| 39 | + if: ${{ inputs.deploy-environment == 'staging' }} |
| 40 | + uses: nationalarchives/ds-github-actions/.github/workflows/website-theme-deploy.yml@main |
| 41 | + with: |
| 42 | + deploy-repo: "${{ github.event.repository.name }}" |
| 43 | + deploy-environment: "${{ inputs.deploy-environment }}" |
| 44 | + release: "${{ inputs.release }}" |
| 45 | + branch: "${{ inputs.branch }}" |
| 46 | + github-environment: "staging-deploy" |
| 47 | + secrets: |
| 48 | + AWS_ROLE_ARN: ${{ secrets.AWS_WEBSITE_ROLE_ARN_STAGING }} |
| 49 | + deployment-run-live: |
| 50 | + if: ${{ inputs.deploy-environment == 'live' }} |
| 51 | + uses: nationalarchives/ds-github-actions/.github/workflows/website-theme-deploy.yml@main |
| 52 | + with: |
| 53 | + deploy-repo: "${{ github.event.repository.name }}" |
| 54 | + deploy-environment: "${{ inputs.deploy-environment }}" |
| 55 | + release: "${{ inputs.release }}" |
| 56 | + branch: "${{ inputs.branch }}" |
| 57 | + github-environment: "live-deploy" |
| 58 | + secrets: |
| 59 | + AWS_ROLE_ARN: ${{ secrets.AWS_WEBSITE_ROLE_ARN_LIVE }} |
| 60 | +... |
0 commit comments