Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add workflow to deploy PRs #49

Merged
merged 1 commit into from
Apr 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ defaults:
run:
working-directory: c182rg-improvement-project

permissions:
id-token: write
contents: read
pull-requests: write

jobs:
build:
name: pr-build
Expand All @@ -32,3 +37,17 @@ jobs:
run: Compress-Archive -Path c182rg-improvement-project -DestinationPath c182rg-improvement-project.zip
- name: package docs
run: Compress-Archive -Path README.txt -Update -DestinationPath c182rg-improvement-project.zip
- name: assume-github-actions-role
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: ${{ secrets.PROJECTS_BUCKET_LIVE_UPLOAD_ROLE_ARN }}
aws-region: eu-west-1
- name: deploy
run: aws s3 cp c182rg-improvement-project.zip s3://projects-live-bucket-bucket-x5u4945s2wzh/c182rg-improvement-project/${{ github.head_ref }}/c182rg-improvement-project.zip --cache-control max-age=60
- name: tag
run: aws s3api put-object-tagging --bucket projects-live-bucket-bucket-x5u4945s2wzh --key c182rg-improvement-project/${{ github.head_ref }}/c182rg-improvement-project.zip --tagging "TagSet=[{Key=expiry_days,Value=90}]"
- name: comment on PR
uses: thollander/actions-comment-pull-request@v2
with:
message: Download the changes in this pull request [here](https://projects.alexchesters.com/c182rg-improvement-project/${{ github.head_ref }}/c182rg-improvement-project.zip).
comment_tag: download_link
Loading