Skip to content

Commit 3ec2c1e

Browse files
authored
feat: add token flag & add testing infra (#14)
1 parent 7b816b7 commit 3ec2c1e

19 files changed

Lines changed: 7954 additions & 9 deletions

.github/workflows/test-deploy.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Test Deploy Command
2+
3+
on:
4+
push:
5+
branches: [main]
6+
schedule:
7+
- cron: "*/10 * * * *"
8+
workflow_dispatch:
9+
10+
jobs:
11+
test-deploy:
12+
runs-on: ubuntu-latest
13+
env:
14+
DENO_DEPLOY_CLI_SPECIFIER: file://${{ github.workspace }}/main.ts
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v4
18+
19+
- name: Setup Deno
20+
uses: denoland/setup-deno@v2
21+
22+
- name: Install Dependencies
23+
run: deno install
24+
25+
- name: Test deno deploy command in astro-demo
26+
working-directory: ./astro-demo
27+
run: deno deploy --token=${{ secrets.DENO_DEPLOY_TOKEN }} --org=${{ env.DENO_DEPLOY_ORG }} --app=${{ env.DENO_DEPLOY_APP }}

astro-demo/.gitignore

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# build output
2+
dist/
3+
4+
# generated types
5+
.astro/
6+
7+
# dependencies
8+
node_modules/
9+
10+
# logs
11+
npm-debug.log*
12+
yarn-debug.log*
13+
yarn-error.log*
14+
pnpm-debug.log*
15+
16+
# environment variables
17+
.env
18+
.env.production
19+
20+
# macOS-specific files
21+
.DS_Store
22+
23+
# jetbrains setting folder
24+
.idea/

astro-demo/README.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Astro Starter Kit: Basics
2+
3+
```sh
4+
deno create astro@latest -- --template basics
5+
```
6+
7+
[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/astro/tree/latest/examples/basics)
8+
[![Open with CodeSandbox](https://assets.codesandbox.io/github/button-edit-lime.svg)](https://codesandbox.io/p/sandbox/github/withastro/astro/tree/latest/examples/basics)
9+
[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/withastro/astro?devcontainer_path=.devcontainer/basics/devcontainer.json)
10+
11+
> 🧑‍🚀 **Seasoned astronaut?** Delete this file. Have fun!
12+
13+
![just-the-basics](https://github.com/withastro/astro/assets/2244813/a0a5533c-a856-4198-8470-2d67b1d7c554)
14+
15+
## 🚀 Project Structure
16+
17+
Inside of your Astro project, you'll see the following folders and files:
18+
19+
```text
20+
/
21+
├── public/
22+
│ └── favicon.svg
23+
├── src/
24+
│ ├── layouts/
25+
│ │ └── Layout.astro
26+
│ └── pages/
27+
│ └── index.astro
28+
└── package.json
29+
```
30+
31+
To learn more about the folder structure of an Astro project, refer to
32+
[our guide on project structure](https://docs.astro.build/en/basics/project-structure/).
33+
34+
## 🧞 Commands
35+
36+
All commands are run from the root of the project, from a terminal:
37+
38+
| Command | Action |
39+
| :--------------------- | :----------------------------------------------- |
40+
| `deno install` | Installs dependencies |
41+
| `deno dev` | Starts local dev server at `localhost:4321` |
42+
| `deno build` | Build your production site to `./dist/` |
43+
| `deno preview` | Preview your build locally, before deploying |
44+
| `deno astro ...` | Run CLI commands like `astro add`, `astro check` |
45+
| `deno astro -- --help` | Get help using the Astro CLI |
46+
47+
## 👀 Want to learn more?
48+
49+
Feel free to check [our documentation](https://docs.astro.build) or jump into
50+
our [Discord server](https://astro.build/chat).

astro-demo/astro.config.mjs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// @ts-check
2+
import { defineConfig } from "astro/config";
3+
import deno from "@deno/astro-adapter";
4+
5+
// https://astro.build/config
6+
export default defineConfig({
7+
output: "server",
8+
adapter: deno(),
9+
});

0 commit comments

Comments
 (0)