Skip to content

Commit 0b23c52

Browse files
committed
Update site template
1 parent 251a654 commit 0b23c52

File tree

13 files changed

+5321
-75
lines changed

13 files changed

+5321
-75
lines changed

.github/workflows/astro.yml

Lines changed: 16 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1,90 +1,40 @@
1-
# Sample workflow for building and deploying an Astro site to GitHub Pages
2-
#
3-
# To get started with Astro see: https://docs.astro.build/en/getting-started/
4-
#
5-
name: Deploy Astro site to Pages
1+
name: Deploy to GitHub Pages
62

73
on:
8-
# Runs on pushes targeting the default branch
4+
# Trigger the workflow every time you push to the `main` branch
5+
# Using a different branch name? Replace `main` with your branch’s name
96
push:
10-
branches: ["main"]
11-
12-
# Allows you to run this workflow manually from the Actions tab
7+
branches: [main]
8+
# Allows you to run this workflow manually from the Actions tab on GitHub.
139
workflow_dispatch:
1410

15-
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
11+
# Allow this job to clone the repo and create a page deployment
1612
permissions:
1713
contents: read
1814
pages: write
1915
id-token: write
2016

21-
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
22-
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
23-
concurrency:
24-
group: "pages"
25-
cancel-in-progress: false
26-
27-
env:
28-
BUILD_PATH: "." # default value when not using subfolders
29-
# BUILD_PATH: subfolder
30-
3117
jobs:
3218
build:
33-
name: Build
3419
runs-on: ubuntu-latest
3520
steps:
36-
- name: Checkout
21+
- name: Checkout your repository using git
3722
uses: actions/checkout@v4
38-
- name: Detect package manager
39-
id: detect-package-manager
40-
run: |
41-
if [ -f "${{ github.workspace }}/yarn.lock" ]; then
42-
echo "manager=yarn" >> $GITHUB_OUTPUT
43-
echo "command=install" >> $GITHUB_OUTPUT
44-
echo "runner=yarn" >> $GITHUB_OUTPUT
45-
echo "lockfile=yarn.lock" >> $GITHUB_OUTPUT
46-
exit 0
47-
elif [ -f "${{ github.workspace }}/package.json" ]; then
48-
echo "manager=npm" >> $GITHUB_OUTPUT
49-
echo "command=ci" >> $GITHUB_OUTPUT
50-
echo "runner=npx --no-install" >> $GITHUB_OUTPUT
51-
echo "lockfile=package-lock.json" >> $GITHUB_OUTPUT
52-
exit 0
53-
else
54-
echo "Unable to determine package manager"
55-
exit 1
56-
fi
57-
- name: Setup Node
58-
uses: actions/setup-node@v4
59-
with:
60-
node-version: "20"
61-
cache: ${{ steps.detect-package-manager.outputs.manager }}
62-
cache-dependency-path: ${{ env.BUILD_PATH }}/${{ steps.detect-package-manager.outputs.lockfile }}
63-
- name: Setup Pages
64-
id: pages
65-
uses: actions/configure-pages@v5
66-
- name: Install dependencies
67-
run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }}
68-
working-directory: ${{ env.BUILD_PATH }}
69-
- name: Build with Astro
70-
run: |
71-
${{ steps.detect-package-manager.outputs.runner }} astro build \
72-
--site "${{ steps.pages.outputs.origin }}" \
73-
--base "${{ steps.pages.outputs.base_path }}"
74-
working-directory: ${{ env.BUILD_PATH }}
75-
- name: Upload artifact
76-
uses: actions/upload-pages-artifact@v3
77-
with:
78-
path: ${{ env.BUILD_PATH }}/dist
23+
- name: Install, build, and upload your site output
24+
uses: withastro/action@v4
25+
# with:
26+
# path: . # The root location of your Astro project inside the repository. (optional)
27+
# node-version: 22 # The specific version of Node that should be used to build your site. Defaults to 22. (optional)
28+
# package-manager: pnpm@latest # The Node package manager that should be used to install dependencies and build your site. Automatically detected based on your lockfile. (optional)
7929

8030
deploy:
31+
needs: build
32+
runs-on: ubuntu-latest
8133
environment:
8234
name: github-pages
8335
url: ${{ steps.deployment.outputs.page_url }}
84-
needs: build
85-
runs-on: ubuntu-latest
86-
name: Deploy
8736
steps:
8837
- name: Deploy to GitHub Pages
8938
id: deployment
9039
uses: actions/deploy-pages@v4
40+

.gitignore

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,24 @@
1-
_site/
2-
.sass-cache/
3-
.jekyll-cache/
4-
.jekyll-metadata
5-
# Ignore folders generated by Bundler
6-
.bundle/
7-
vendor/
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/

README.md

Lines changed: 46 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,46 @@
1-
# appfair.net
2-
The web site for the App Fair Project catalog at https://appfair.net
1+
# Astro Starter Kit: Basics
2+
3+
```sh
4+
npm create astro@latest -- --template basics
5+
```
6+
7+
> 🧑‍🚀 **Seasoned astronaut?** Delete this file. Have fun!
8+
9+
## 🚀 Project Structure
10+
11+
Inside of your Astro project, you'll see the following folders and files:
12+
13+
```text
14+
/
15+
├── public/
16+
│ └── favicon.svg
17+
├── src
18+
│   ├── assets
19+
│   │   └── astro.svg
20+
│   ├── components
21+
│   │   └── Welcome.astro
22+
│   ├── layouts
23+
│   │   └── Layout.astro
24+
│   └── pages
25+
│   └── index.astro
26+
└── package.json
27+
```
28+
29+
To learn more about the folder structure of an Astro project, refer to [our guide on project structure](https://docs.astro.build/en/basics/project-structure/).
30+
31+
## 🧞 Commands
32+
33+
All commands are run from the root of the project, from a terminal:
34+
35+
| Command | Action |
36+
| :------------------------ | :----------------------------------------------- |
37+
| `npm install` | Installs dependencies |
38+
| `npm run dev` | Starts local dev server at `localhost:4321` |
39+
| `npm run build` | Build your production site to `./dist/` |
40+
| `npm run preview` | Preview your build locally, before deploying |
41+
| `npm run astro ...` | Run CLI commands like `astro add`, `astro check` |
42+
| `npm run astro -- --help` | Get help using the Astro CLI |
43+
44+
## 👀 Want to learn more?
45+
46+
Feel free to check [our documentation](https://docs.astro.build) or jump into our [Discord server](https://astro.build/chat).

astro.config.mjs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// @ts-check
2+
import { defineConfig } from 'astro/config';
3+
4+
// https://astro.build/config
5+
export default defineConfig({});

0 commit comments

Comments
 (0)