-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* change deployment to S3 * make deploy +x * make sure that documents will be publically accessible * Add cloudfront invalidation * Add version to automatically update the monolith * Use $GITHUB_SHA for version instead of current date * inline deployment and remove unnecessary step * revert deleting build step * use script to install dependencies again
- Loading branch information
1 parent
40a56d8
commit fa86dc1
Showing
3 changed files
with
14 additions
and
17 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,16 +18,18 @@ jobs: | |
- name: Run the PDF compilation process | ||
run: bin/build.sh | ||
|
||
- name: Push to GitHub build branch | ||
uses: JamesIves/[email protected] | ||
- name: Configure AWS credentials | ||
uses: aws-actions/configure-aws-credentials@v4 | ||
with: | ||
branch: build | ||
folder: build | ||
aws-access-key-id: ${{ secrets.CI_CD_AWS_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ secrets.CI_CD_AWS_SECRET_ACCESS_KEY }} | ||
aws-region: ${{ secrets.AWS_DEFAULT_REGION }} | ||
|
||
- name: Trigger website deployment | ||
env: | ||
WCA_HOST: 34.208.140.116 | ||
- name: Trigger S3 deployment | ||
run: | | ||
mkdir -p $HOME/.ssh | ||
echo "${{ secrets.DEPLOY_PRIVATE_KEY }}" > /tmp/deploy_rsa | ||
bin/deploy.sh | ||
aws s3 sync build s3://wca-documents/ --acl public-read | ||
# Update version file so the website will update its cache | ||
git_hash=$(git rev-parse --short "$GITHUB_SHA") | ||
echo "$git_hash" > version | ||
aws s3 cp version s3://wca-documents/version | ||
aws cloudfront create-invalidation --distribution-id E31ELE3W069ZX7 --paths "/*" --output text |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
# Generated PDF files. | ||
build/ | ||
# Version of the generated pdfs | ||
**/version |
This file was deleted.
Oops, something went wrong.