-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
130 changed files
with
4,338 additions
and
360 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
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,7 @@ | ||
<!-- Enter 'x' into the checkbox to confirm (if applicable). --> | ||
|
||
* [ ] I have spellchecked my content using Microsoft Word, Grammarly, or otherwise. | ||
* [ ] If required, update the [DEA Tech Alerts and Changelog](TechAlertsChangelog) and the [DEA Sandbox Updates banner](SandboxUpdatesBanner). | ||
|
||
[TechAlertsChangelog]: https://github.com/GeoscienceAustralia/dea-knowledge-hub/blob/main/docs/tech-alerts-changelog/_tech_alerts_changelog.md | ||
[SandboxUpdatesBanner]: https://bitbucket.org/geoscienceaustralia/datakube-apps/src/64c28bbf3d0e019d8940547a22f78b9bfd58d739/clusters/dea-sandbox/sandbox.yaml |
This file was deleted.
Oops, something went wrong.
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,114 @@ | ||
name: Deploy to PR Preview | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
env: | ||
PR_PREVIEW_PULL_REQUEST_NUMBER: ${{github.event.pull_request.number}} | ||
PR_PREVIEW_SUBDOMAIN: pr-${{github.event.pull_request.number}}-preview | ||
PR_PREVIEW_DEPLOY_LOG_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} | ||
PR_PREVIEW_BUCKET: s3://khpreview.dea.ga.gov.au | ||
PR_PREVIEW_SKIP_COMMAND_1: "[no preview]" | ||
PR_PREVIEW_SKIP_COMMAND_2: "[skip preview]" | ||
|
||
permissions: | ||
id-token: write # For requesting the JWT used by OIDC Authentication | ||
issues: write | ||
pull-requests: write | ||
|
||
jobs: | ||
pr-preview: | ||
runs-on: ubuntu-latest | ||
if: | | ||
!contains(github.event.head_commit.message, '${{ env.PR_PREVIEW_SKIP_COMMAND_1 }}') && | ||
!contains(github.event.head_commit.message, '${{ env.PR_PREVIEW_SKIP_COMMAND_2 }}') && | ||
!contains(github.event.pull_request.title, '${{ env.PR_PREVIEW_SKIP_COMMAND_1 }}') && | ||
!contains(github.event.pull_request.title, '${{ env.PR_PREVIEW_SKIP_COMMAND_2 }}') && | ||
!contains(github.event.pull_request.body, '${{ env.PR_PREVIEW_SKIP_COMMAND_1 }}') && | ||
!contains(github.event.pull_request.body, '${{ env.PR_PREVIEW_SKIP_COMMAND_2 }}') | ||
strategy: | ||
matrix: | ||
python-version: ["3.11"] | ||
node-version: [18.x] | ||
|
||
steps: | ||
- name: Find Comment | ||
uses: peter-evans/find-comment@v3 | ||
id: find-comment | ||
with: | ||
issue-number: ${{ github.event.pull_request.number }} | ||
comment-author: 'github-actions[bot]' | ||
body-includes: PR Preview | ||
|
||
- name: "Comment: PR Preview is deploying" | ||
uses: peter-evans/create-or-update-comment@v4 | ||
with: | ||
issue-number: ${{github.event.pull_request.number}} | ||
comment-id: ${{ steps.find-comment.outputs.comment-id }} | ||
edit-mode: replace | ||
body: | | ||
## :hourglass: PR Preview is deploying ... | ||
<table> | ||
<tr> | ||
<td><strong>Deploy log:</strong></td> | ||
<td><a href="${{ env.PR_PREVIEW_DEPLOY_LOG_URL }}">View the log</a></td> | ||
</tr> | ||
</table> | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
|
||
- name: Pull latest from submodules | ||
run: git submodule foreach git pull origin stable | ||
# This doesn't update the submodule to the latest commit on the origin; therefore, you should manually do this on a semi-regular basis. | ||
|
||
- name: Install Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
cache: 'pip' # Use pip to cache the installed dependencies | ||
|
||
- name: Install dependencies | ||
run: ./install-dependencies.sh | ||
|
||
- name: Build site | ||
env: | ||
BUILD_MODE: pr-preview | ||
run: ./build-pr-preview.sh | ||
|
||
- name: Configure AWS credentials via OIDC | ||
uses: aws-actions/configure-aws-credentials@v4 | ||
with: | ||
role-to-assume: arn:aws:iam::538673716275:role/github-actions-dea-knowledge-hub-prs | ||
aws-region: ap-southeast-2 | ||
|
||
- name: Deploy preview site | ||
run: | | ||
aws s3 sync --delete output "$PR_PREVIEW_BUCKET/$PR_PREVIEW_SUBDOMAIN" | ||
- name: "Update Comment: PR Preview is ready" | ||
uses: peter-evans/create-or-update-comment@v4 | ||
with: | ||
issue-number: ${{github.event.pull_request.number}} | ||
comment-id: ${{ steps.find-comment.outputs.comment-id }} | ||
edit-mode: replace | ||
body: | | ||
## :star2: PR Preview is ready! | ||
<table> | ||
<tr> | ||
<td><strong>Preview site:</strong></td> | ||
<td><a href="https://${{ env.PR_PREVIEW_SUBDOMAIN }}.khpreview.dea.ga.gov.au/">${{ env.PR_PREVIEW_SUBDOMAIN }}.khpreview.dea.ga.gov.au</a></td> | ||
</tr> | ||
<tr> | ||
<td><strong>Deploy log:</strong></td> | ||
<td><a href="${{ env.PR_PREVIEW_DEPLOY_LOG_URL }}">View the log</a></td> | ||
</tr> | ||
</table> | ||
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
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
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
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
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,3 +1,7 @@ | ||
# DEA Knowledge Hub | ||
|
||
To contribute content to this site, please [follow the publication process and git workflow](https://geoscienceau.sharepoint.com/:w:/r/sites/DEA/_layouts/15/Doc.aspx?sourcedoc=%7BE75F31A8-1648-4DA3-9E36-9BB8135921B2%7D&file=DEA%20Publication%20Process.docx&action=default&mobileredirect=true). | ||
This is the repository for the [DEA Knowledge Hub](https://knowledge.dea.ga.gov.au/) website. | ||
|
||
It was previously called 'DEA Docs' or 'dea-docs'. | ||
|
||
To contribute content to this site, please follow the [publication process and git workflow](https://geoscienceau.sharepoint.com/:w:/r/sites/DEA/_layouts/15/Doc.aspx?sourcedoc=%7BE75F31A8-1648-4DA3-9E36-9BB8135921B2%7D&file=DEA%20Publication%20Process.docx&action=default&mobileredirect=true). |
This file was deleted.
Oops, something went wrong.
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
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
Oops, something went wrong.