generated from ministryofjustice/template-repository
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: GitHub <noreply@github.com>
- Loading branch information
Jacob Woffenden
authored
Apr 16, 2024
1 parent
5dd0711
commit 424ef86
Showing
14 changed files
with
116 additions
and
135 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 |
---|---|---|
@@ -1,12 +1,8 @@ | ||
# To get started with Dependabot version updates, you'll need to specify which | ||
# package ecosystems to update and where the package manifests are located. | ||
# Please see the documentation for all configuration options: | ||
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
|
||
--- | ||
version: 2 | ||
|
||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
time: "09:00" # UTC |
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,44 @@ | ||
--- | ||
name: Build and Test | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
permissions: {} | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
container: | ||
image: docker.io/ministryofjustice/tech-docs-github-pages-publisher@sha256:cd3513beca3fcaf5dd34cbe81a33b3ff30337d8ada5869b40a6454c21d6f7684 # v4.0.0 | ||
permissions: | ||
contents: read | ||
steps: | ||
- name: Checkout | ||
id: checkout | ||
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 | ||
|
||
- name: Build | ||
id: build | ||
run: | | ||
/usr/local/bin/package | ||
test: | ||
name: Test | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
steps: | ||
- name: Checkout | ||
id: checkout | ||
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 | ||
|
||
- name: Lychee | ||
id: lychee | ||
uses: lycheeverse/lychee-action@c053181aa0c3d17606addfe97a9075a32723548a # v1.9.3 | ||
with: | ||
args: --verbose --no-progress './**/*.md' './**/*.html' './**/*.erb' --accept 403,200,429 | ||
fail: 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,28 @@ | ||
# Need a GitHub Advanced Security license to run this action on private repos. | ||
|
||
--- | ||
name: Dependency Review | ||
|
||
on: | ||
pull_request: | ||
types: [opened, edited, reopened, synchronize] | ||
types: | ||
- edited | ||
- opened | ||
- reopened | ||
- synchronize | ||
|
||
permissions: | ||
contents: read | ||
permissions: {} | ||
|
||
jobs: | ||
dependency-review: | ||
name: Dependency Review | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
- name: Checkout | ||
id: checkout | ||
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 | ||
|
||
- name: Dependency Review | ||
uses: actions/dependency-review-action@v3 | ||
uses: actions/dependency-review-action@9129d7d40b8c12c1ed0f60400d00c92d437adcce # v4.1.3 | ||
with: | ||
# Possible values: critical, high, moderate, low | ||
fail-on-severity: critical |
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 |
---|---|---|
@@ -1,69 +1,60 @@ | ||
name: Publish gh-pages | ||
--- | ||
name: Build and Publish | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- "main" | ||
paths-ignore: | ||
- "docs/**" | ||
- main | ||
|
||
# GITHUB_TOKEN permissions to allow deployment to GitHub Pages | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
permissions: {} | ||
|
||
# Allow one concurrent deployment | ||
concurrency: | ||
group: "pages" | ||
group: github-pages | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
container: | ||
image: ministryofjustice/tech-docs-github-pages-publisher:v3 | ||
image: docker.io/ministryofjustice/tech-docs-github-pages-publisher@sha256:cd3513beca3fcaf5dd34cbe81a33b3ff30337d8ada5869b40a6454c21d6f7684 # v4.0.0 | ||
permissions: | ||
contents: read | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Compile Markdown to HTML and create artifact | ||
id: checkout | ||
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 | ||
|
||
- name: Build | ||
id: build | ||
run: | | ||
/scripts/deploy.sh | ||
- name: Upload artifact to be published | ||
uses: actions/upload-artifact@v3 | ||
/usr/local/bin/package | ||
- name: Upload Artifact | ||
id: upload_artifact | ||
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 | ||
with: | ||
name: github-pages | ||
path: artifact.tar | ||
retention-days: 1 | ||
overwrite: true | ||
|
||
deploy: | ||
publish: | ||
needs: build | ||
name: Publish | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: ubuntu-latest | ||
url: ${{ steps.configure_pages.outputs.base_url }} | ||
permissions: | ||
contents: read | ||
id-token: write | ||
pages: write | ||
steps: | ||
- name: Setup Pages | ||
uses: actions/configure-pages@v3 | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v2 | ||
- name: Configure Pages | ||
id: configure_pages | ||
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5.0.0 | ||
|
||
url-check: | ||
needs: deploy | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Download a Build Artifact from build | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: github-pages | ||
path: github-pages | ||
- name: Unpack files and check URL links | ||
run: | | ||
cd github-pages | ||
tar -xvf artifact.tar | ||
npm install linkinator | ||
npx linkinator . --recurse --markdown \ | ||
--skip https://ministryofjustice.github.io/template-documentation-site/images/govuk-large.png \ | ||
# "URL Check will fail on private and internal GitHub repositories" | ||
- name: Deploy to GitHub Pages | ||
id: deploy_pages | ||
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5 |
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 +1,10 @@ | ||
.env | ||
.terraform/ | ||
coverage/ | ||
venv/ | ||
env/ | ||
.DS_STORE | ||
.vscode | ||
*.code-workspace | ||
*.sha256 | ||
terraform.tfstate |
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
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,23 +1,8 @@ | ||
IMAGE := ministryofjustice/tech-docs-github-pages-publisher:v3 | ||
|
||
# Use this to run a local instance of the documentation site, while editing | ||
.PHONY: preview check | ||
IMAGE := docker.io/ministryofjustice/tech-docs-github-pages-publisher@sha256:cd3513beca3fcaf5dd34cbe81a33b3ff30337d8ada5869b40a6454c21d6f7684 # v4.0.0 | ||
|
||
preview: | ||
docker run --rm \ | ||
-v $$(pwd)/config:/app/config \ | ||
-v $$(pwd)/source:/app/source \ | ||
-p 4567:4567 \ | ||
-it $(IMAGE) /scripts/preview.sh | ||
|
||
deploy: | ||
docker run --rm \ | ||
-v $$(pwd)/config:/app/config \ | ||
-v $$(pwd)/source:/app/source \ | ||
-it $(IMAGE) /scripts/deploy.sh | ||
|
||
check: | ||
docker run --rm \ | ||
-v $$(pwd)/config:/app/config \ | ||
-v $$(pwd)/source:/app/source \ | ||
-it $(IMAGE) /scripts/check-url-links.sh | ||
docker run --rm -it \ | ||
--volume $$(pwd)/config:/app/config \ | ||
--volume $$(pwd)/source:/app/source \ | ||
--publish 4567:4567 \ | ||
$(IMAGE) /usr/local/bin/preview |
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