forked from MorelloProject/website
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'production_morello_site' of github.com:kylekirkby/websi…
…te-5 into production_morello_site
- Loading branch information
Showing
6 changed files
with
190 additions
and
9 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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
AWS_STATIC_SITE_PROFILE=morello-org-buildbot | ||
AWS_STATIC_SITE_URL=production-morello-project-org | ||
CF_DIST_ID_STATIC_LO=E2GWIYO8RAV1ZB | ||
CLOUDFRONT_ADD_SECURITY_HEADERS_ARN=arn:aws:lambda:us-east-1:718845120493:function:cloudfront-add-security-headers-production:1 | ||
JEKYLL_ENV=production | ||
SITE_URL=production.morello-project.org |
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: ClosePullRequestAction | ||
|
||
on: | ||
pull_request_target: | ||
types: [closed] | ||
branches: [ main, master, develop ] | ||
|
||
jobs: | ||
close: | ||
runs-on: self-hosted | ||
steps: | ||
- name: Initialise environment | ||
run: cat ".github-env-$GITHUB_BASE_REF" >> $GITHUB_ENV | ||
- name: Clean up | ||
run: /srv/github-action-scripts/close-pr.sh |
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 |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: PullRequestAction | ||
|
||
on: | ||
pull_request_target: | ||
branches: [ main, master, develop ] | ||
|
||
jobs: | ||
build: | ||
runs-on: self-hosted | ||
steps: | ||
- name: Cancel previous runs | ||
uses: n1hility/cancel-previous-runs@v2 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Fetch git repository | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Initialise environment | ||
run: cat ".github-env-$GITHUB_BASE_REF" >> $GITHUB_ENV | ||
|
||
- run: env | ||
|
||
- name: Initialise status | ||
run: /srv/github-action-scripts/init-deploy-preview.sh | ||
env: | ||
TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Merge test branch | ||
uses: linaro-its/merge-test-branch@v1 | ||
|
||
- name: Build site | ||
run: /srv/github-action-scripts/build-jekyll-site.sh | ||
env: | ||
TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
check-links: | ||
needs: build | ||
runs-on: self-hosted | ||
steps: | ||
- name: Initialise environment | ||
run: cat ".github-env-$GITHUB_BASE_REF" >> $GITHUB_ENV | ||
|
||
- name: Check links | ||
run: /srv/github-action-scripts/check-links.sh | ||
|
||
test-routing-rules: | ||
needs: check-links | ||
runs-on: self-hosted | ||
steps: | ||
- name: Check routing rules | ||
run: /srv/github-action-scripts/test-routing-rules.sh |
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 |
---|---|---|
@@ -0,0 +1,101 @@ | ||
name: PushAction | ||
|
||
on: | ||
push: | ||
branches: [ main, master, develop ] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: self-hosted | ||
steps: | ||
- name: Cancel previous runs | ||
uses: n1hility/cancel-previous-runs@v2 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Fetch git repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Initialise environment | ||
run: cat ".github-env-${GITHUB_REF##*/}" >> $GITHUB_ENV | ||
|
||
- run: env | ||
|
||
- name: Directory push/pop | ||
uses: linaro-its/[email protected] | ||
with: | ||
cacheDirectory: /srv/site-builds | ||
namedDirectory: ${{ env.SITE_URL }} | ||
|
||
- name: Build site | ||
run: /srv/github-action-scripts/build-jekyll-site.sh | ||
env: | ||
TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
check-links: | ||
needs: build | ||
runs-on: self-hosted | ||
steps: | ||
- name: Initialise environment | ||
run: cat ".github-env-${GITHUB_REF##*/}" >> $GITHUB_ENV | ||
|
||
- name: Check links | ||
run: /srv/github-action-scripts/check-links.sh /srv/site-builds/${{ env.SITE_URL }} | ||
|
||
test-routing-rules: | ||
needs: check-links | ||
runs-on: self-hosted | ||
steps: | ||
- name: Check routing rules | ||
run: /srv/github-action-scripts/test-routing-rules.sh | ||
|
||
sync-to-s3-staging: | ||
needs: test-routing-rules | ||
runs-on: self-hosted | ||
steps: | ||
- name: Make staging directory | ||
run: mkdir -p /srv/s3-staging/${{ env.SITE_URL }} | ||
|
||
- name: Sync build to staging directory | ||
run: rsync -crui /srv/site-builds/${{ env.SITE_URL }}/ /srv/s3-staging/${{ env.SITE_URL }} --delete | ||
|
||
update-to-s3: | ||
needs: sync-to-s3-staging | ||
runs-on: self-hosted | ||
steps: | ||
- name: Initialise environment | ||
run: cat ".github-env-${GITHUB_REF##*/}" >> $GITHUB_ENV | ||
|
||
- name: Upload to S3 | ||
run: /srv/github-action-scripts/upload-to-s3-root.sh | ||
|
||
set-up-lambda-redirect: | ||
needs: update-to-s3 | ||
runs-on: self-hosted | ||
steps: | ||
- name: Initialise environment | ||
run: cat ".github-env-${GITHUB_REF##*/}" >> $GITHUB_ENV | ||
|
||
- name: Set up Lambda redirect | ||
run: /srv/github-action-scripts/set-up-lambda-redirect.sh /srv/site-builds/${{ env.SITE_URL }} | ||
|
||
set-up-security-headers: | ||
needs: set-up-lambda-redirect | ||
runs-on: self-hosted | ||
steps: | ||
- name: Initialise environment | ||
run: cat ".github-env-${GITHUB_REF##*/}" >> $GITHUB_ENV | ||
|
||
- name: Set up security headers | ||
run: cd /srv/github-action-scripts && pipenv run python lambda-security-headers.py | ||
|
||
invalidate-cloudfront: | ||
needs: set-up-security-headers | ||
runs-on: self-hosted | ||
steps: | ||
- name: Initialise environment | ||
run: cat ".github-env-${GITHUB_REF##*/}" >> $GITHUB_ENV | ||
|
||
- name: Invalidate CloudFront cache | ||
run: /srv/github-action-scripts/invalidate-cloudfront.sh |
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,4 +1,6 @@ | ||
build-site.sh @pcolmer @morancj | ||
check-links.sh @pcolmer @morancj | ||
CODEOWNERS @pcolmer @morancj | ||
Gemfile @pcolmer @morancj | ||
build-site.sh @pcolmer @kylekirkby | ||
check-links.sh @pcolmer @kylekirkby | ||
CODEOWNERS @pcolmer @kylekirkby | ||
Gemfile @pcolmer @kylekirkby | ||
.github-env-master @pcolmer @kylekirkby | ||
.github/workflows @pcolmer @kylekirkby |
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