Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
decobot authored Nov 3, 2023
0 parents commit e8b237b
Show file tree
Hide file tree
Showing 197 changed files with 15,383 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM mcr.microsoft.com/vscode/devcontainers/base:0-buster

ENV DENO_INSTALL=/deno
RUN mkdir -p /deno \
&& curl -fsSL https://deno.land/x/install/install.sh | sh \
&& chown -R vscode /deno

ENV PATH=${DENO_INSTALL}/bin:${PATH} \
DENO_DIR=${DENO_INSTALL}/.cache/deno

EXPOSE 8000
# [Optional] Uncomment this section to install additional OS packages.
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
# && apt-get -y install --no-install-recommends <your-package-list-here>
31 changes: 31 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.183.0/containers/deno
{
"name": "Deno",
"dockerFile": "Dockerfile",
"appPort": [
8000
], // Specify the ports you want to forward
"forwardPorts": [
8000
],
// Set *default* container specific settings.json values on container create.
"settings": {},
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"denoland.vscode-deno",
"bradlc.vscode-tailwindcss",
"ecmel.vscode-html-css",
"Tobermory.es6-string-html"
],
"postCreateCommand": "gh codespace ports visibility 8000:public -c $CODESPACE_NAME",
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
// Uncomment to use the Docker CLI from inside the container. See https://aka.ms/vscode-remote/samples/docker-from-docker.
// "mounts": [ "source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind" ],
// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "vscode",
"features": {
"ghcr.io/devcontainers/features/github-cli:1": {}
}
}
5 changes: 5 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
DECO_SITE_NAME=storefront-vtex
# DECO_SITE_NAME=storefront-linx
# DECO_SITE_NAME=storefront-wake
# DECO_SITE_NAME=storefront-vnda
# DECO_SITE_NAME=store-shopify
54 changes: 54 additions & 0 deletions .github/workflows/deco-deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Deploy

concurrency:
group: environment-${{ github.head_ref || github.ref }}

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
set_vars:
runs-on: ubuntu-latest
outputs:
site_matrix: ${{ steps.set_vars.outputs.site_matrix }}
steps:
- name: Set site matrix
id: set_vars
shell: bash
run: |
if [ -z ${{ vars.SITES }} ]; then
echo "site_matrix={site: [\"${{ github.event.repository.name }}\"] }" >> $GITHUB_OUTPUT
else
echo "site_matrix={site: ${{ vars.SITES }} }" >> $GITHUB_OUTPUT
fi
deploy:
needs: set_vars
strategy:
matrix: ${{ fromJson(needs.set_vars.outputs.site_matrix) }}
name: Deploy
runs-on: ubuntu-latest

permissions:
id-token: write # Needed for auth with Deno Deploy
contents: read # Needed to clone the repository

steps:
- name: Clone repository
uses: actions/checkout@v3

- name: Deco Deploy
id: decoDeployStep
continue-on-error: true
uses: deco-cx/deploy@v0
with:
site: ${{ matrix.site }}

- name: Retry Deco Deploy
id: decoDeployRetryStep
if: steps.decoDeployStep.outcome == 'failure'
uses: deco-cx/deploy@v0
with:
site: ${{ matrix.site }}
75 changes: 75 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Typescript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

.cache/

# Mac files
.DS_Store

# Yarn
yarn-error.log
.pnp/
.pnp.js
# Yarn Integrity file
.yarn-integrity

dist/
server/

import_map.local.json
# db files
.config.json
# Fresh build directory
_fresh/

deno.lock
8 changes: 8 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"recommendations": [
"ecmel.vscode-html-css",
"tobermory.es6-string-html",
"denoland.vscode-deno",
"bradlc.vscode-tailwindcss"
]
}
16 changes: 16 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"deno.enable": true,
"deno.lint": true,
"deno.unstable": true,
"deno.codeLens.test": true,
"editor.quickSuggestions": {
"strings": true
},
"editor.defaultFormatter": "denoland.vscode-deno",
"[markdown]": {
"editor.defaultFormatter": "DavidAnson.vscode-markdownlint"
},
"[html]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
}
Loading

0 comments on commit e8b237b

Please sign in to comment.