Skip to content

Commit e717fb0

Browse files
authored
Merge pull request #1 from 0xnim/main
Updates
2 parents c6034d4 + fa14344 commit e717fb0

File tree

7 files changed

+870
-233
lines changed

7 files changed

+870
-233
lines changed

.github/workflows/deploy.yml

+67
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
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
6+
7+
on:
8+
# Runs on pushes targeting the default branch
9+
push:
10+
branches: ["main"]
11+
12+
# Allows you to run this workflow manually from the Actions tab
13+
workflow_dispatch:
14+
15+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
16+
permissions:
17+
contents: read
18+
pages: write
19+
id-token: write
20+
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+
31+
jobs:
32+
build:
33+
name: Build
34+
runs-on: ubuntu-latest
35+
steps:
36+
- name: Checkout
37+
uses: actions/checkout@v4
38+
- name: Setup Bun
39+
uses: oven-sh/setup-bun@v2
40+
- name: Setup Pages
41+
id: pages
42+
uses: actions/configure-pages@v5
43+
- name: Install dependencies
44+
run: bun install
45+
working-directory: ${{ env.BUILD_PATH }}
46+
- name: Build with Astro
47+
run: |
48+
bun run astro build \
49+
--site "${{ steps.pages.outputs.origin }}" \
50+
--base "${{ steps.pages.outputs.base_path }}"
51+
working-directory: ${{ env.BUILD_PATH }}
52+
- name: Upload artifact
53+
uses: actions/upload-pages-artifact@v3
54+
with:
55+
path: ${{ env.BUILD_PATH }}/dist
56+
57+
deploy:
58+
environment:
59+
name: github-pages
60+
url: ${{ steps.deployment.outputs.page_url }}
61+
needs: build
62+
runs-on: ubuntu-latest
63+
name: Deploy
64+
steps:
65+
- name: Deploy to GitHub Pages
66+
id: deployment
67+
uses: actions/deploy-pages@v4

.github/workflows/test.yml

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
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: Test if it build on all platforms
6+
7+
on:
8+
# Runs on pushes targeting the default branch
9+
push:
10+
branches: ["main"]
11+
paths:
12+
- "package.json"
13+
- "package-lock.json"
14+
15+
# Allows you to run this workflow manually from the Actions tab
16+
workflow_dispatch:
17+
18+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
19+
permissions:
20+
contents: read
21+
22+
env:
23+
BUILD_PATH: "." # default value when not using subfolders
24+
# BUILD_PATH: subfolder
25+
26+
jobs:
27+
build:
28+
name: Build
29+
runs-on: ${{ matrix.os }}
30+
strategy:
31+
matrix:
32+
include:
33+
- os: macos-14
34+
- os: ubuntu-latest
35+
- os: windows-latest
36+
steps:
37+
- name: Checkout
38+
uses: actions/checkout@v4
39+
- name: Setup Bun
40+
uses: oven-sh/setup-bun@v2
41+
- name: Setup Pages
42+
id: pages
43+
uses: actions/configure-pages@v5
44+
- name: Install dependencies
45+
run: bun install
46+
working-directory: ${{ env.BUILD_PATH }}
47+
- name: Build with Astro
48+
run: bun run astro build
49+
working-directory: ${{ env.BUILD_PATH }}

0 commit comments

Comments
 (0)