diff --git a/.github/workflows/add-to-project.yml b/.github/workflows/add-to-project.yml new file mode 100644 index 0000000..dddcc49 --- /dev/null +++ b/.github/workflows/add-to-project.yml @@ -0,0 +1,37 @@ +name: Add to project board + +on: + issues: + types: + - opened + - reopened + - transferred + pull_request: + types: + - reopened + - opened + +permissions: + pull-requests: write + +jobs: + add-to-project: + name: Add to project + runs-on: ubuntu-latest + steps: + - name: Add issue or PR to project board + uses: actions/add-to-project@v1.0.2 + with: + project-url: https://github.com/orgs/seedcase-project/projects/18 + github-token: ${{ secrets.ADD_TO_BOARD }} + + - name: Assign PR to creator + if: ${{ github.event_name == 'pull_request' }} + run: | + gh pr edit $PR --add-assignee $AUTHOR + env: + AUTHOR: ${{ github.event.pull_request.user.login }} + PR: ${{ github.event.pull_request.html_url }} + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + diff --git a/.github/workflows/auto-author-assign.yml b/.github/workflows/auto-author-assign.yml deleted file mode 100644 index 7277937..0000000 --- a/.github/workflows/auto-author-assign.yml +++ /dev/null @@ -1,16 +0,0 @@ -# .github/workflows/auto-author-assign.yml -# https://github.com/marketplace/actions/auto-author-assign -name: Auto Author Assign - -on: - pull_request_target: - types: [ opened, reopened ] - -permissions: - pull-requests: write - -jobs: - assign-author: - runs-on: ubuntu-latest - steps: - - uses: toshimaru/auto-author-assign@v2.1.0 \ No newline at end of file diff --git a/.github/workflows/deploy-website.yml b/.github/workflows/deploy-website.yml new file mode 100644 index 0000000..8dff883 --- /dev/null +++ b/.github/workflows/deploy-website.yml @@ -0,0 +1,11 @@ +name: Build and deploy website + +on: + push: + branches: main + +jobs: + build-deploy-docs: + uses: seedcase-project/.github/.github/workflows/deploy-docs.yml@main + secrets: + netlify-token: ${{ secrets.NETLIFY_AUTH_TOKEN }} diff --git a/.github/workflows/pr-commands.yaml b/.github/workflows/pr-commands.yaml deleted file mode 100644 index 07fe6ad..0000000 --- a/.github/workflows/pr-commands.yaml +++ /dev/null @@ -1,39 +0,0 @@ -# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples -# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help -on: - issue_comment: - types: [created] - -name: Commands - -jobs: - reformat_markdown: - if: ${{ github.event.issue.pull_request && (github.event.comment.author_association == 'MEMBER' || github.event.comment.author_association == 'OWNER') && startsWith(github.event.comment.body, '/reformat_markdown') }} - name: reformat_markdown - runs-on: ubuntu-latest - env: - GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} - steps: - - uses: actions/checkout@v3 - - - uses: r-lib/actions/pr-fetch@v2 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - - - uses: r-lib/actions/setup-pandoc@v2 - with: - pandoc-version: '2.17.1' # The pandoc version to download (if necessary) and use. - - - name: Reformat Markdown files - run: bash tools/pr/reformat-markdown.sh - - - name: Commit - run: | - git config --local user.name "$GITHUB_ACTOR" - git config --local user.email "$GITHUB_ACTOR@users.noreply.github.com" - git add . - git commit -m 'Reformatted changed Markdown files to canonical format [skip ci]' - - - uses: r-lib/actions/pr-push@v2 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/quarto-render-publish.yml b/.github/workflows/quarto-render-publish.yml deleted file mode 100644 index e7a0700..0000000 --- a/.github/workflows/quarto-render-publish.yml +++ /dev/null @@ -1,26 +0,0 @@ -on: - push: - branches: main - -name: Render and Publish - -jobs: - build-deploy: - runs-on: ubuntu-latest - steps: - - name: Check out repository - uses: actions/checkout@v4 - - - name: Set up Quarto - uses: quarto-dev/quarto-actions/setup@v2 - with: - # To install LaTeX to build PDF book - tinytex: false - # uncomment below and fill to pin a version - # version: 0.9.600 - - - name: Publish to Netlify (and render) - uses: quarto-dev/quarto-actions/publish@v2 - with: - target: netlify - NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} diff --git a/.vscode/json.code-snippets b/.vscode/json.code-snippets index fafcd72..6cfd8a1 100644 --- a/.vscode/json.code-snippets +++ b/.vscode/json.code-snippets @@ -1,160 +1,137 @@ { - // Place your snippets for Quarto here. - // Each snippet is defined under a snippet name and has a prefix, body and description. - // The prefix is what is used to trigger the snippet and the body will be expanded and inserted. - // Possible variables are: - // - // - $1 and $2 for tab stops, - // - $0 for the final cursor position, and - // - ${1:label}, ${2:another} for placeholders - // - // Placeholders with the same ids are connected. - // - // How to use the code snippets: - // After you have set the above settings, a suggestion for one of the code snippets below will pop up automatically, when - // you start writing the prefix. Press "Enter" or "Tab" to insert the code snippet. - - "Insert TODO formatting": { - "scope": "quarto,markdown", - "prefix": "TODO", - "body": [ - "" - ], - "description": "Insert TODO formatting" - } - - "Insert bash formatted text": { - "scope": "quarto,markdown", - "prefix": "bash", - "body": [ - "``` bash" - "${0:Write text here}" - "```" - ], - "description": "Insert bash formatted text" - } - - "Insert YAML header for blogs": { - "scope": "quarto,markdown", - "prefix": "post_yaml", - "body": [ - "---" - "title: \"\"" - "description: \"Our reasons for ...\"" - "author: \"\"" - "date: last-modified" - "categories:" - " ${0:Type 'category_keywords' to insert categories}" - "---" - ], - "description": "Insert YAML header for Quarto blog posts." - } - - "Insert a hidden comment section": { - "scope": "quarto,markdown", - "prefix": "hidden", - "body": [ - "::: content-hidden" - "${0:Write comments here}" - ":::" - ], - "description": "Insert a hidden content section" - } - - "Insert a 2 col table": { - "scope": "quarto,markdown", - "prefix": "tbl2", - "body": [ - "|${1:title} |${0:title} |", - "| --- | --- |", - "| | |" - ], - "description": "Insert a 2 col table" - } - - "Insert a 3 col table": { - "scope": "quarto,markdown", - "prefix": "tbl3", - "body": [ - "|${1:title} |${2:title} |${0:title} |", - "| --- | --- | --- |", - "| | | |" - ], - "description": "Insert a 3 col table" - } - - "Insert video": { - "scope": "quarto,markdown", - "prefix": "video", - "body": [ - "{{< video ${0:Insert link here} >}}" - ], - "description": "Insert video that will be shown" - } - - "Insert paneltab": { - "scope": "quarto,markdown", - "prefix": "paneltab", - "body": [ - ::: panel-tabset - ### ${0:Header} - - ${1:Text body} - - ### ${2:Header} - - ${3:Text body} - ::: - ], - "description": "Insert paneltab (including two tabs here). If you want additional tabs, just include more headers." - } - -// All our key words are included in this code snippet -// The idea is that we can insert this section and then delete the words we aren't interested in -// If words are missing then they can be added to the document, and then also added to the code snippet -// Much the same way that words can be added to the spell-check extension. - "Insert list of category words": { - "scope": "quarto,markdown,yaml", - "prefix": "category_keywords", - "body": [ - "- api" - "- backend" - "- blogs" - "- code snippets" - "- communication" - "- container" - "- contributing" - "- copyright" - "- culture" - "- database" - "- development" - "- documentation" - "- frontend" - "- github" - "- implementation" - "- installation" - "- licensing" - "- management" - "- markdown" - "- organization" - "- programming" - "- repositories" - "- reviewing" - "- software" - "- software architecture" - "- standardisation" - "- structure" - "- team work" - "- teamworking" - "- technology" - "- templates" - "- tools" - "- vs code" - "- web" - "- website" - "- workflow" - "- writing" - ], - "description": "Insert list of category words" - } + // Place your snippets for Quarto here. + // Each snippet is defined under a snippet name and has a prefix, body and description. + // The prefix is what is used to trigger the snippet and the body will be expanded and inserted. + // Possible variables are: + // + // - $1 and $2 for tab stops, + // - $0 for the final cursor position, and + // - ${1:label}, ${2:another} for placeholders + // + // Placeholders with the same ids are connected. + // + // How to use the code snippets: + // After you have set the above settings, a suggestion for one of the code snippets below will pop up automatically, when + // you start writing the prefix. Press "Enter" or "Tab" to insert the code snippet. + "Insert TODO formatting": { + "scope": "quarto,markdown", + "prefix": "TODO", + "body": [ + "" + ], + "description": "Insert TODO formatting" + }, + "Insert bash formatted text": { + "scope": "quarto,markdown", + "prefix": "bash", + "body": [ + "``` bash", + "${0:Write text here}", + "```" + ], + "description": "Insert bash formatted text" + }, + "Insert YAML header for blogs": { + "scope": "quarto,markdown", + "prefix": "post_yaml", + "body": [ + "---", + "title: \"\"", + "description: \"Our reasons for ...\"", + "author: \"\"", + "date: last-modified", + "categories:", + " ${0:Type 'category_keywords' to insert categories}", + "---" + ], + "description": "Insert YAML header for Quarto blog posts." + }, + "Insert a hidden comment section": { + "scope": "quarto,markdown", + "prefix": "hidden", + "body": [ + "::: content-hidden", + "${0:Write comments here}", + ":::" + ], + "description": "Insert a hidden content section" + }, + "Insert a 2 col table": { + "scope": "quarto,markdown", + "prefix": "tbl2", + "body": [ + "|${1:title} |${0:title} |", + "| --- | --- |", + "| | |" + ], + "description": "Insert a 2 col table" + }, + "Insert a 3 col table": { + "scope": "quarto,markdown", + "prefix": "tbl3", + "body": [ + "|${1:title} |${2:title} |${0:title} |", + "| --- | --- | --- |", + "| | | |" + ], + "description": "Insert a 3 col table" + }, + "Insert video": { + "scope": "quarto,markdown", + "prefix": "video", + "body": [ + "{{< video ${0:Insert link here} >}}" + ], + "description": "Insert video that will be shown" + }, + "Insert paneltab": { + "scope": "quarto,markdown", + "prefix": "paneltab", + "body": [ + "::: panel-tabset", + "### ${0:Header}", + "", + "${1:Text body}", + "", + "### ${2:Header}", + "", + "${3:Text body}", + ":::" + ], + "description": "Insert paneltab (including two tabs here). If you want additional tabs, just include more headers." + }, + // All our category words are included in this code snippet + // The idea is that we can insert this section and then delete the words we aren't interested in + // If words are missing then they can be added to the document, and then also added to the code snippet + // Much the same way that words can be added to the spell-check extension. + "Insert list of category words": { + "scope": "quarto,markdown,yaml", + "prefix": "decision_categories", + "body": [ + "- backend", + "- code snippets", + "- communicate", + "- container", + "- contribute", + "- collaborate", + "- database", + "- deploy", + "- dependencies", + "- develop", + "- document", + "- front end", + "- framework", + "- git", + "- install", + "- license", + "- manage", + "- organize", + "- standardise", + "- style", + "- web", + "- workflow", + "- write" + ], + "description": "Insert list of category words" + } } diff --git a/justfile b/justfile index 17085cc..8837c27 100644 --- a/justfile +++ b/justfile @@ -1,10 +1,14 @@ @_default: just --list --unsorted -# Generate PNG images from PlantUML files -generate-puml: +# Generate SVG images from all PlantUML files +generate-puml-all: docker run --rm -v $(pwd):/puml -w /puml ghcr.io/plantuml/plantuml:latest -tsvg "**/*.puml" +# Generate SVG image from specific PlantUML file +generate-puml name: + docker run --rm -v $(pwd):/puml -w /puml ghcr.io/plantuml/plantuml:latest -tsvg "**/{{name}}.puml" + # Build the website using Quarto build-website: docker run --rm -v $(pwd):/site -w /site ghcr.io/quarto-dev/quarto:latest quarto render