-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from nesi/advisory-heron
Advisory heron
- Loading branch information
Showing
13 changed files
with
2,314 additions
and
302 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 |
---|---|---|
@@ -1,68 +1,73 @@ | ||
# Requires some setup | ||
|
||
|
||
# name: Deploy PR branches | ||
# on: | ||
# pull_request: | ||
# env: | ||
# GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# TARGET_REPO: "support-docs-dev" | ||
# TARGET_OWNER: "CallumWalley" | ||
# WORKFLOW_ID: "deploy.yml" | ||
# DEPLOY_URL: "https://callumwalley.github.io/support-docs-dev" | ||
# HEAD: ${{ github.event.pull_request.head.ref }} | ||
# permissions: write-all | ||
# jobs: | ||
# demo-deploy: | ||
# # continue-on-error: true | ||
# name: Trigger test deployments | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - name: Trigger Workflow in Another Repository | ||
# run: | | ||
# set -x | ||
# set -o xtrace | ||
# curl -L \ | ||
# -X POST \ | ||
# -H "Accept: application/vnd.github+json" \ | ||
# -H "Authorization: Bearer ${{ secrets.PAT }}" \ | ||
# -H "X-GitHub-Api-Version: 2022-11-28" \ | ||
# https://api.github.com/repos/${TARGET_OWNER}/${TARGET_REPO}/dispatches \ | ||
# -d '{"event_type":"deploy","client_payload":{"pr-branches":"${{ github.event.pull_request.head.ref }}", "use-cache":"true"}}' | ||
# - name: Wait for Workflow Action | ||
# run: | | ||
# # Just give a minute or so to deploy | ||
# # sleep 90 | ||
# # curl -L \ | ||
# # -X POST \ | ||
# # -H "Accept: application/vnd.github+json" \ | ||
# # -H "Authorization: Bearer ${{ secrets.PAT }}" \ | ||
# # -H "X-GitHub-Api-Version: 2022-11-28" \ | ||
# # https://api.github.com/repos/${TARGET_OWNER}/${TARGET_REPO}/actions/runs/deploy.yml | ||
# - name: Checkout repository | ||
# uses: actions/checkout@v4 | ||
# with: | ||
# fetch-depth: 0 | ||
# - name: Post messages open requests | ||
# run: | | ||
# msg="Test deployment available at <a href=\"${DEPLOY_URL}/${HEAD}\">${DEPLOY_URL}/${HEAD}</a>" | ||
# changed_pages="$(git diff --name-only origin/main -- '*.md')" | ||
# # Logic for truncating out long sections commented out. | ||
# # maxlines=-5 | ||
# if [ -n "${changed_pages}" ]; then | ||
# msg="${msg}<br><br>Seems the following pages differ;<br><ul>" | ||
# for f in ${changed_pages};do | ||
# # maxlines=((maxlines+1)) | ||
# #if [ ${maxlines} -lt 1 ]; then | ||
# g=${f#*/}; h=${g%.*} | ||
# msg="${msg}<li><a href=\"${DEPLOY_URL}/${HEAD}/${h}\" target=_blank>${h##*/}</a></li>" | ||
# #fi | ||
# done | ||
# # if [ ${maxlines} -gt 0 ];then | ||
# # msg="${msg}<li> ... and ${maxlines} more.</li>" | ||
# # fi | ||
# msg="${msg}</ul>" | ||
# fi | ||
# msg="${msg}<br><em>Test site may take a minute or so to deploy after PR Open or Update.</em>" | ||
# (gh pr comment ${HEAD} --edit-last --body "${msg}") || (gh pr comment ${HEAD} --body "${msg}") | ||
# echo "::info title=Deploy successful::${DEPLOY_URL}/${HEAD}" | ||
name: Deploy PR branches | ||
on: | ||
pull_request: | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
TARGET_REPO: "mkdocs-demo-deploy" | ||
TARGET_OWNER: "CallumWalley" | ||
WORKFLOW_ID: "deploy.yml" | ||
DEPLOY_URL: "https://callumwalley.github.io/mkdocs-demo-deploy" | ||
HEAD: ${{ github.event.pull_request.head.ref }} | ||
permissions: write-all | ||
jobs: | ||
demo-deploy: | ||
# continue-on-error: true | ||
name: Trigger test deployments | ||
runs-on: ubuntu-latest | ||
steps: | ||
# - name: Trigger Workflow in Another Repository | ||
# run: | | ||
# set -x | ||
# set -o xtrace | ||
# curl -L \ | ||
# -X POST \ | ||
# -H "Accept: application/vnd.github+json" \ | ||
# -H "Authorization: Bearer ${{ secrets.PAT }}" \ | ||
# -H "X-GitHub-Api-Version: 2022-11-28" \ | ||
# https://api.github.com/repos/${TARGET_OWNER}/${TARGET_REPO}/dispatches \ | ||
# -d "{\"event_type\":\"deploy\",\"client_payload\":}" | ||
- name: Run 'deploy.yml' Workflow | ||
uses: convictional/[email protected] | ||
with: | ||
owner: ${TARGET_OWNER} | ||
repo: ${TARGET_REPO} | ||
github_token: ${{ secrets.PAT }} | ||
workflow_file_name: deploy.yml | ||
client_payload: '{\"targets\":\"${GITHUB_REPOSITORY}:${HEAD}\", \"use-cache\":\"true\"}' | ||
# - name: Wait for Workflow Action | ||
# run: | | ||
# # Just give a minute or so to deploy | ||
# # sleep 60 | ||
# curl -L \ | ||
# -X POST \ | ||
# -H "Accept: application/vnd.github+json" \ | ||
# -H "Authorization: Bearer ${{ secrets.PAT }}" \ | ||
# -H "X-GitHub-Api-Version: 2022-11-28" \ | ||
# https://api.github.com/repos/${TARGET_OWNER}/${TARGET_REPO}/actions/runs/deploy.yml | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Post messages open requests | ||
run: | | ||
msg="Test deployment available at <a href=\"${DEPLOY_URL}/${GITHUB_REPOSITORY}/${HEAD}\">${DEPLOY_URL}/${GITHUB_REPOSITORY}/${HEAD}</a>" | ||
changed_pages="$(git diff --name-only origin/main -- '*.md')" | ||
# Logic for truncating out long sections commented out. | ||
# maxlines=-5 | ||
if [ -n "${changed_pages}" ]; then | ||
msg="${msg}<br><br>Seems the following pages differ;<br><ul>" | ||
for f in ${changed_pages};do | ||
# maxlines=((maxlines+1)) | ||
#if [ ${maxlines} -lt 1 ]; then | ||
g=${f#*/}; h=${g%.*} | ||
msg="${msg}<li><a href=\"${DEPLOY_URL}/${GITHUB_REPOSITORY}/${HEAD}/${h}\" target=_blank>${h##*/}</a></li>" | ||
#fi | ||
done | ||
# if [ ${maxlines} -gt 0 ];then | ||
# msg="${msg}<li> ... and ${maxlines} more.</li>" | ||
# fi | ||
msg="${msg}</ul>" | ||
fi | ||
msg="${msg}<br><br><em><a href="${DEPLOY_URL}">See all deployed demo sites</a></em>" | ||
(gh pr comment ${HEAD} --edit-last --body "${msg}") || (gh pr comment ${HEAD} --body "${msg}") | ||
echo "::info title=Deploy successful::${DEPLOY_URL}/${GITHUB_REPOSITORY}/${HEAD}" |
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 |
---|---|---|
|
@@ -2,3 +2,4 @@ public/* | |
production/* | ||
**.pyc | ||
.venv/* | ||
dictionary.dic |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.