From 6467d10f85cf2ec1cf9656333f33ce98effbf311 Mon Sep 17 00:00:00 2001 From: MattIPv4 Date: Mon, 27 Apr 2020 20:30:56 +0100 Subject: [PATCH] GitHub files --- .github/ISSUE_TEMPLATE/help.md | 29 ++++++++++++++ .github/ISSUE_TEMPLATE/report-a-bug.md | 36 +++++++++++++++++ .github/ISSUE_TEMPLATE/request-a-feature.md | 38 ++++++++++++++++++ .github/PULL_REQUEST_TEMPLATE.md | 16 ++++++++ .github/workflows/do-spaces-workflow.yml | 43 +++++++++++++++++++++ .github/workflows/gh-pages-workflow.yml | 38 ++++++++++++++++++ 6 files changed, 200 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/help.md create mode 100644 .github/ISSUE_TEMPLATE/report-a-bug.md create mode 100644 .github/ISSUE_TEMPLATE/request-a-feature.md create mode 100644 .github/PULL_REQUEST_TEMPLATE.md create mode 100644 .github/workflows/do-spaces-workflow.yml create mode 100644 .github/workflows/gh-pages-workflow.yml diff --git a/.github/ISSUE_TEMPLATE/help.md b/.github/ISSUE_TEMPLATE/help.md new file mode 100644 index 0000000..417d0ac --- /dev/null +++ b/.github/ISSUE_TEMPLATE/help.md @@ -0,0 +1,29 @@ +--- +name: Help ❓ +about: Encountered a problem with the tool? +--- + + + +## Information + + +## Help request + +### Problem + + +### What I have tried + + +### Screenshots + diff --git a/.github/ISSUE_TEMPLATE/report-a-bug.md b/.github/ISSUE_TEMPLATE/report-a-bug.md new file mode 100644 index 0000000..747d227 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/report-a-bug.md @@ -0,0 +1,36 @@ +--- +name: Report a bug 🐛 +about: Report a bug with the tool. Only use this if you're 100% sure there's something wrong, otherwise, try "Help". +--- + + + +## Information + + +## Details + +### Description + + +### Steps to reproduce + + +### Expected behavior + + +### Screenshots + diff --git a/.github/ISSUE_TEMPLATE/request-a-feature.md b/.github/ISSUE_TEMPLATE/request-a-feature.md new file mode 100644 index 0000000..8ba9eb5 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/request-a-feature.md @@ -0,0 +1,38 @@ +--- +name: Request a feature 🆕 +about: Suggest a new feature that you would like in the tool! +--- + + + +## Feature request + +### Feature description + + +### How the feature is useful + diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..13d8689 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,16 @@ +## Type of Change + + +- **Build Scripts:** +- **Tool Source:** +- **Something else:** + +## What issue does this relate to? + + +### What should this PR do? + + +### What are the acceptance criteria? + + diff --git a/.github/workflows/do-spaces-workflow.yml b/.github/workflows/do-spaces-workflow.yml new file mode 100644 index 0000000..bf07c65 --- /dev/null +++ b/.github/workflows/do-spaces-workflow.yml @@ -0,0 +1,43 @@ +name: Test and Deploy to DigitalOcean Spaces + +on: push + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + + - name: Read .nvmrc + run: echo "##[set-output name=NVMRC;]$(cat .nvmrc)" + id: nvm + + - name: Use Node.js (.nvmrc) + uses: actions/setup-node@v1 + with: + node-version: "${{ steps.nvm.outputs.NVMRC }}" + + - name: npm ci, test, and build + run: | + npm ci + npm test + npm run build + env: + DIGITALOCEAN_TOKEN: ${{ secrets.DIGITALOCEAN_TOKEN }} + + - name: Deploy commit to DigitalOcean Spaces + run: aws s3 sync ./dist s3://${{ secrets.SPACES_BUCKET }}/commits/available-images/${{ github.sha }} --endpoint=https://${{ secrets.SPACES_REGION }}.digitaloceanspaces.com --acl public-read --content-encoding utf8 + env: + AWS_ACCESS_KEY_ID: ${{ secrets.SPACES_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.SPACES_SECRET_ACCESS_KEY }} + AWS_DEFAULT_REGION: ${{ secrets.SPACES_REGION }} + + - name: Leave a comment + run: npm run deploy:spaces:comment + env: + REPO_NAME: ${{ github.repository }} + COMMIT_SHA: ${{ github.sha }} + GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }} + SPACES_REGION: ${{ secrets.SPACES_REGION }} + SPACES_BUCKET: ${{ secrets.SPACES_BUCKET }} diff --git a/.github/workflows/gh-pages-workflow.yml b/.github/workflows/gh-pages-workflow.yml new file mode 100644 index 0000000..789daac --- /dev/null +++ b/.github/workflows/gh-pages-workflow.yml @@ -0,0 +1,38 @@ +name: Test and Deploy to GitHub Pages + +on: + push: + branches: + - master + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + + - name: Read .nvmrc + run: echo "##[set-output name=NVMRC;]$(cat .nvmrc)" + id: nvm + + - name: Use Node.js (.nvmrc) + uses: actions/setup-node@v1 + with: + node-version: "${{ steps.nvm.outputs.NVMRC }}" + + - name: npm ci, test, and build + run: | + npm ci + npm test + npm run build + env: + DIGITALOCEAN_TOKEN: ${{ secrets.DIGITALOCEAN_TOKEN }} + + - name: Deploy master to GitHub Pages + uses: JamesIves/github-pages-deploy-action@2.0.0 + env: + ACCESS_TOKEN: ${{ secrets.DEV_GITHUB_TOKEN }} + BASE_BRANCH: master + BRANCH: gh-pages + FOLDER: dist