-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (44 loc) · 1.53 KB
/
artifacts_workflow.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Dynamic Workflow and Upload Files
on:
workflow_dispatch:
inputs:
index_document:
description: 'Name of the index document'
required: true
default: 'index.html'
error_document:
description: 'Name of the error document'
required: true
default: 'error.html'
env:
BUCKET_NAME: website
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v2
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-session-token: ${{secrets.AWS_SESSION_TOKEN}}
aws-region: us-east-1
- name: Create CloudFormation Stack
uses: aws-actions/aws-cloudformation-github-deploy@v1
with:
name: udaartifact
template: udaartifact.yml
# no-fail-on-empty-changeset: "1"
#- name: Upload files to S3 bucket
# run: |
# aws s3 cp ./website/${{ github.event.inputs.index_document }} s3://${{env.BUCKET_NAME}}
# aws s3 cp ./website/${{ github.event.inputs.error_document }} s3://${{env.BUCKET_NAME}}
#
#- name: Show S3 bucket website URL
# run: |
# aws cloudformation describe-stacks \
# --stack-name uda-artifact \
# --query 'Stacks[0].Outputs[?OutputKey==`ArtifactBucketWebsiteURL`].OutputValue' \
# --output text