Skip to content

Commit

Permalink
Merge pull request #24 from alphagov/feature/housekeeping_repo
Browse files Browse the repository at this point in the history
Housekeeping repository for better process
  • Loading branch information
alliington authored Feb 26, 2024
2 parents 6e8e176 + cd62410 commit d2b7e4e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ jobs:
role-to-assume: ${{ secrets.ROLE_TO_ASSUME_ARN }}
aws-region: eu-west-2

- name: Run Makefile
run: bash deploy.sh
- name: Build
run: bash build.sh
shell: bash

- name: Deploy
run: |
aws s3 cp --recursive paas_app s3://prod-vdp.cabinetoffice.gov.uk-website
shell: bash
4 changes: 1 addition & 3 deletions deploy.sh → build.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

# Manage content on the S3 for prod account.
# Build security.txt app

if [[ "$OSTYPE" == "linux-gnu"* ]]; then
DATE_NOW=$(date --rfc-3339='seconds')
Expand All @@ -13,8 +13,6 @@ if [[ "$OSTYPE" == "linux-gnu"* ]]; then
cp ./security.txt ./paas_app/security.txt
cp ./thanks.txt ./paas_app/thanks.txt
cp ./paas_app/security.txt ./paas_app/.well-known/security.txt

aws s3 cp --recursive paas_app s3://prod-vdp.cabinetoffice.gov.uk-website
else
echo "Due to different output format in date, only Linux is supported"
exit 1
Expand Down
6 changes: 5 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,8 @@ This is so that we can update the `security.txt` from one place.

- To make changes in thanks.txt create a new pull request. Once approved GitHub automatically will deploy new file to the AWS where content is being hosted.
- File security.txt is a template which is being updated and uploaded on every merge to main with new expiration date
- The deployment also occurs every week to update the _expires_ field.
- The deployment also occurs every week to update the _expires_ field.

### Caching

- Current setup is using cache service in the fron of the app. Please allow up to 24 hours before any changes will be visible after merging code to main branch.

0 comments on commit d2b7e4e

Please sign in to comment.