v0.2.2 #4
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: Publish documentation | |
on: | |
release: | |
types: | |
- published | |
permissions: | |
contents: read | |
id-token: write | |
env: | |
INSTANCE: 'Writerside/cd' | |
ARTIFACT: 'webHelpCD2-all.zip' | |
DOCKER_VERSION: '242.21870' | |
jobs: | |
check-tag-name-exists: | |
runs-on: ubuntu-latest | |
if: ${{ github.event.release.tag_name != '' }} | |
steps: | |
- run: "true" | |
publish: | |
env: | |
AWS_REGION: 'us-east-1' | |
BRANCH_NAME: main | |
runs-on: ubuntu-latest | |
environment: release | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Download assets | |
uses: robinraju/release-downloader@v1 | |
with: | |
tag: ${{ github.event.release.tag_name }} | |
fileName: ${{ env.ARTIFACT }} | |
- name: configure aws credentials | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
role-to-assume: ${{ secrets.AWS_OIDC_ROLE_ARN }} | |
aws-region: ${{ env.AWS_REGION }} | |
role-duration-seconds: 900 | |
- name: Upload artifact to S3 | |
run: aws s3api put-object --bucket ${{ secrets.AWS_S3_BUCKET }} --key ${{ env.ARTIFACT }} --body ${{ env.ARTIFACT }} | |
- name: Deploy artifact to Amplify | |
run: | | |
aws amplify start-deployment \ | |
--app-id ${{ secrets.AMPLIFY_APP_ID }} \ | |
--branch-name ${{ env.BRANCH_NAME }} \ | |
--source-url s3://${{ secrets.AWS_S3_BUCKET }}/${{ env.ARTIFACT }} |