Skip to content

Commit

Permalink
chore: ensure that all templates restart from time to time (#2418)
Browse files Browse the repository at this point in the history
  • Loading branch information
CompuIves committed May 8, 2024
1 parent d0009a0 commit e01f18d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 14 deletions.
27 changes: 15 additions & 12 deletions .github/workflows/restart-template.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
name: Restart Template

on:
schedule:
# Restart every template every 3 days, to ensure that the snapshot remains
- cron: "0 07 */3 * *"
workflow_dispatch:
inputs:
template:
description: 'Enter the folder name for the template (empty to restart all templates)'
description: "Enter the folder name for the template (empty to restart all templates)"
required: false
type: string

Expand All @@ -16,15 +19,15 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout head
uses: actions/checkout@v3
with:
fetch-depth: 2
- name: Checkout head
uses: actions/checkout@v3
with:
fetch-depth: 2

- name: Setup Deno
uses: denoland/setup-deno@v1
with:
deno-version: v1.x
- name: Run Deno Script
run: deno run --allow-read --allow-net --allow-write --allow-env --unstable --allow-run .scripts/restart-all-templates.ts ${{ inputs.template }}
- name: Setup Deno
uses: denoland/setup-deno@v1
with:
deno-version: v1.x

- name: Run Deno Script
run: deno run --allow-read --allow-net --allow-write --allow-env --unstable --allow-run .scripts/restart-all-templates.ts ${{ inputs.template }}
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ We have 4 official Sandbox templates:

- **[React](https://codesandbox.io/p/sandbox/react-new)**
- **[React Typescript](https://codesandbox.io/p/sandbox/react-typescript-react-ts)**
- **[Vanilla Typescript](https://codesandbox.io/p/sandbox/vanilla-typescript-vanilla-ts
)**
- **[Vanilla Typescript](https://codesandbox.io/p/sandbox/vanilla-typescript-vanilla-ts)**
- **HTML + CSS** ([GitHub](https://github.com/codesandbox-app/static-template))

When converting a Sandbox to a Devbox we use the [Sandbox Migration](./sandbox-migration/) template, which has all dependencies of our Sandbox templates installed.
Expand Down

0 comments on commit e01f18d

Please sign in to comment.