Skip to content

Commit

Permalink
renames
Browse files Browse the repository at this point in the history
  • Loading branch information
valiantlynx committed Mar 21, 2024
1 parent 3c07c7d commit bc24128
Show file tree
Hide file tree
Showing 65 changed files with 1,542 additions and 5 deletions.
41 changes: 41 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"name": "svelte-rich-text-dev",
"dockerComposeFile": ["../docker-compose.dev.yml"],
"service": "svelte-rich-text-dev",
"workspaceFolder": "/app",
"customizations": {
"vscode": {
"extensions": [
"etmoffat.pip-packages",
"aaron-bond.better-comments",
"formulahendry.auto-rename-tag",
"formulahendry.code-runner",
"github.copilot",
"github.vscode-pull-request-github",
"ms-azuretools.vscode-docker",
"ms-vscode-remote.remote-containers",
"ms-vscode-remote.remote-ssh",
"ms-vscode-remote.vscode-remote-extensionpack",
"ms-toolsai.jupyter",
"ritwickdey.liveserver",
"visualstudioexptteam.vscodeintellicode",
"vscode-icons-team.vscode-icons",
"esbenp.prettier-vscode",
"jpotterm.simple-vim",
"wakatime.vscode-wakatime",
"svelte.svelte-vscode",
"ardenivanov.svelte-intellisense",
"fivethree.vscode-svelte-snippets"
],
"settings": {
"python.pythonPath": "/usr/local/bin/python",
"python.linting.pylintEnabled": false,
"python.linting.flake8Enabled": true,
"python.linting.flake8Args": ["--max-line-length=88"],
"python.formatting.provider": "ms-python.python",
"editor.formatOnSave": true
}
}
},
"postCreateCommand": "sudo apt-get update && sudo apt-get upgrade -y"
}
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DEPLOY_TARGET=node
14 changes: 14 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# These are supported funding model platforms

github: [valiantlynx]
patreon: valiantlynx
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
polar: # Replace with a single Polar username
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
38 changes: 38 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
10 changes: 10 additions & 0 deletions .github/ISSUE_TEMPLATE/custom.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
name: Custom issue template
about: Describe this issue template's purpose here.
title: ''
labels: ''
assignees: ''

---


20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
29 changes: 29 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# `dependabot.yml` file with updates
# disabled for Docker and limited for npm

version: 2
updates:
# Configuration for Dockerfile
- package-ecosystem: 'docker'
directory: '/'
schedule:
interval: 'weekly'
# Disable all pull requests for Docker dependencies
# open-pull-requests-limit: 0

# Configuration for npm
- package-ecosystem: 'npm'
directory: '/'
schedule:
interval: 'weekly'
ignore:
# Ignore updates to packages that start with 'aws'
# Wildcards match zero or more arbitrary characters
- dependency-name: 'aws*'
# Ignore some updates to the 'express' package
- dependency-name: 'express'
# Ignore only new versions for 4.x and 5.x
versions: ['4.x', '5.x']
# For all packages, ignore all patch updates
- dependency-name: '*'
update-types: ['version-update:semver-patch']
29 changes: 29 additions & 0 deletions .github/extra_workflows/deploy-azure.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy
# More GitHub Actions for Azure: https://github.com/Azure/actions

name: Build and deploy container app to Azure Web App - svelte-rich-text

on:
workflow_dispatch:
workflow_run:
workflows: ["svelte-rich-text"] # This triggers the deployment after svelte-rich-text workflow completes
types:
- completed

jobs:
deploy:
runs-on: ubuntu-latest
environment:
name: 'production'
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}

steps:
- name: Deploy to Azure Web App
id: deploy-to-webapp
if: github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.head_branch == 'main'
uses: azure/webapps-deploy@v2
with:
app-name: 'svelte-rich-text'
slot-name: 'production'
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE }}
images: 'index.docker.io/${{ secrets.DOCKER_HUB_USERNAME }}/svelte-rich-text:commit-${{ github.sha }}'
42 changes: 42 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Deploy
run-name: ${{ github.actor }} is deploying 🚀🚀🚀

on:
workflow_dispatch:
workflow_run:
workflows: ["svelte-rich-text"] # This triggers the deployment after ollama-docker workflow completes
types:
- completed

env:
AWS_ACCESS_KEY: ${{ secrets.AWS_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
CLOUDFLARE_EMAIL: ${{ secrets.CLOUDFLARE_EMAIL }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}

jobs:
build-infra:
name: terraform-ci-cd
runs-on: ubuntu-latest
if: github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.head_branch == 'main'
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Terraform
uses: hashicorp/setup-terraform@v2
- name: Terraform Init
id: init
run: terraform init
working-directory: ./terraform
- name: Terraform Validate
id: validate
run: terraform validate
working-directory: ./terraform
- name: Terraform Plan
id: plan
run: terraform plan
working-directory: ./terraform
- name: Terraform Apply
id: apply
run: terraform apply --auto-approve
working-directory: ./terraform
37 changes: 37 additions & 0 deletions .github/workflows/destroy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Destroy
run-name: ${{ github.actor }} is destroying production 💥💥💥

on:
workflow_dispatch:

env:
AWS_ACCESS_KEY: ${{ secrets.AWS_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
CLOUDFLARE_EMAIL: ${{ secrets.CLOUDFLARE_EMAIL }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}

jobs:
build-infra:
name: terraform-ci-cd
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Terraform
uses: hashicorp/setup-terraform@v2
- name: Terraform Init
id: init
run: terraform init
working-directory: ./terraform
- name: Terraform Validate
id: validate
run: terraform validate
working-directory: ./terraform
- name: Terraform Plan
id: plan
run: terraform plan
working-directory: ./terraform
- name: Terraform destroy
id: destroy
run: terraform destroy --auto-approve
working-directory: ./terraform
96 changes: 96 additions & 0 deletions .github/workflows/svelte-rich-text.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
name: svelte-rich-text

run-name: ${{ github.actor }} is building svelte-rich-text image 📷

on:
push:
branches:
- 'main'
paths:
- '**'
pull_request:
branches:
- 'main'
paths:
- '**'
schedule:
- cron: '0 0 * * 0'
workflow_dispatch:
workflow_call: # Added to allow this workflow to be called by other workflows


jobs:
build-and-push-images:
name: Build svelte-rich-text
runs-on: ubuntu-latest
permissions:
packages: write
contents: read

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3

- name: Cache Docker layers
uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Login to Docker Hub
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }}

- name: Login to GitHub Container registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v1
env:
GITHUB_USER: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
registry: ghcr.io
username: $GITHUB_USER
password: ${{ secrets.GITHUB_TOKEN }}

- name: Docker meta
id: docker_meta
uses: docker/metadata-action@v3
with:
images: |
${{ secrets.DOCKER_HUB_USERNAME }}/svelte-rich-text
ghcr.io/${{ secrets.DOCKER_HUB_USERNAME }}/svelte-rich-text
flavor: |
latest=false
tags: |
type=sha,prefix=commit-,format=long
type=raw,value=latest

- name: Build and tag Docker image and push to Docker Hub
uses: docker/build-push-action@v2
id: docker_build
with:
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}
builder: ${{ steps.buildx.outputs.name }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
context: .
file: ./Dockerfile.solo

- name: Show image digest
run: |
echo ${{ steps.docker_build.outputs.digest }}
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ node_modules
/dist
/.svelte-kit
/package
.env
.env.*
!.env.example
vite.config.js.timestamp-*
Expand Down
Loading

0 comments on commit bc24128

Please sign in to comment.