chore: Add website auto build using github pages
This commit is contained in:
48
.github/workflows/publish-website.yml
vendored
Normal file
48
.github/workflows/publish-website.yml
vendored
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
# SPDX-FileCopyrightText: 2024 Linnea Gräf <nea@nea.moe>
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
|
on:
|
||||||
|
- push
|
||||||
|
name: Web
|
||||||
|
jobs:
|
||||||
|
build-website:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
name: Astro Build
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
name: Checkout Code
|
||||||
|
- name: Setup node
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: 23
|
||||||
|
- name: Setup PNPM
|
||||||
|
uses: pnpm/action-setup@v4
|
||||||
|
with:
|
||||||
|
package_json_file: 'web/package.json'
|
||||||
|
- name: Build Astro
|
||||||
|
run: |
|
||||||
|
cd web
|
||||||
|
pnpm install --frozen-lockfile
|
||||||
|
pnpm build
|
||||||
|
- name: Upload web artifact
|
||||||
|
uses: actions/upload-pages-artifact@v3
|
||||||
|
with:
|
||||||
|
path: web/dist/
|
||||||
|
deploy-website:
|
||||||
|
name: Deploy Website
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: build-website
|
||||||
|
if: ${{ 'push' == github.event_name && 'master' == github.ref_name && '637563904' == github.repository_id }}
|
||||||
|
environment:
|
||||||
|
name: github-pages
|
||||||
|
url: ${{ steps.deployment.outputs.page_url }}
|
||||||
|
permissions:
|
||||||
|
pages: write
|
||||||
|
id-token: write
|
||||||
|
steps:
|
||||||
|
- uses: actions/download-artifact@v4
|
||||||
|
name: Download web artifact
|
||||||
|
- name: Deploy github pages
|
||||||
|
id: deployment
|
||||||
|
uses: actions/deploy-pages@v4
|
||||||
@@ -1,19 +1,21 @@
|
|||||||
{
|
{
|
||||||
"name": "",
|
"packageManager": "pnpm@9.3.0",
|
||||||
"type": "module",
|
"name": "",
|
||||||
"version": "0.0.1",
|
"type": "module",
|
||||||
"scripts": {
|
"version": "0.0.1",
|
||||||
"dev": "astro dev",
|
"scripts": {
|
||||||
"start": "astro dev",
|
"dev": "astro dev",
|
||||||
"build": "astro check && astro build",
|
"start": "astro dev",
|
||||||
"preview": "astro preview",
|
"build": "astro check && astro build",
|
||||||
"astro": "astro"
|
"preview": "astro preview",
|
||||||
},
|
"astro": "astro"
|
||||||
"dependencies": {
|
},
|
||||||
"@astrojs/check": "^0.9.4",
|
"dependencies": {
|
||||||
"@astrojs/tailwind": "^5.1.2",
|
"@astrojs/check": "^0.9.4",
|
||||||
"astro": "^4.16.13",
|
"@astrojs/tailwind": "^5.1.2",
|
||||||
"tailwindcss": "^3.4.15",
|
"astro": "^4.16.13",
|
||||||
"typescript": "^5.6.3"
|
"sharp": "^0.33.5",
|
||||||
}
|
"tailwindcss": "^3.4.15",
|
||||||
|
"typescript": "^5.6.3"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
13
web/pnpm-lock.yaml
generated
13
web/pnpm-lock.yaml
generated
@@ -17,6 +17,9 @@ importers:
|
|||||||
astro:
|
astro:
|
||||||
specifier: ^4.16.13
|
specifier: ^4.16.13
|
||||||
version: 4.16.13(rollup@4.27.2)(typescript@5.6.3)
|
version: 4.16.13(rollup@4.27.2)(typescript@5.6.3)
|
||||||
|
sharp:
|
||||||
|
specifier: ^0.33.5
|
||||||
|
version: 0.33.5
|
||||||
tailwindcss:
|
tailwindcss:
|
||||||
specifier: ^3.4.15
|
specifier: ^3.4.15
|
||||||
version: 3.4.15
|
version: 3.4.15
|
||||||
@@ -2943,13 +2946,11 @@ snapshots:
|
|||||||
dependencies:
|
dependencies:
|
||||||
color-name: 1.1.4
|
color-name: 1.1.4
|
||||||
simple-swizzle: 0.2.2
|
simple-swizzle: 0.2.2
|
||||||
optional: true
|
|
||||||
|
|
||||||
color@4.2.3:
|
color@4.2.3:
|
||||||
dependencies:
|
dependencies:
|
||||||
color-convert: 2.0.1
|
color-convert: 2.0.1
|
||||||
color-string: 1.9.1
|
color-string: 1.9.1
|
||||||
optional: true
|
|
||||||
|
|
||||||
comma-separated-tokens@2.0.3: {}
|
comma-separated-tokens@2.0.3: {}
|
||||||
|
|
||||||
@@ -2979,8 +2980,7 @@ snapshots:
|
|||||||
|
|
||||||
dequal@2.0.3: {}
|
dequal@2.0.3: {}
|
||||||
|
|
||||||
detect-libc@2.0.3:
|
detect-libc@2.0.3: {}
|
||||||
optional: true
|
|
||||||
|
|
||||||
deterministic-object-hash@2.0.2:
|
deterministic-object-hash@2.0.2:
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -3248,8 +3248,7 @@ snapshots:
|
|||||||
|
|
||||||
import-meta-resolve@4.1.0: {}
|
import-meta-resolve@4.1.0: {}
|
||||||
|
|
||||||
is-arrayish@0.3.2:
|
is-arrayish@0.3.2: {}
|
||||||
optional: true
|
|
||||||
|
|
||||||
is-binary-path@2.1.0:
|
is-binary-path@2.1.0:
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -4062,7 +4061,6 @@ snapshots:
|
|||||||
'@img/sharp-wasm32': 0.33.5
|
'@img/sharp-wasm32': 0.33.5
|
||||||
'@img/sharp-win32-ia32': 0.33.5
|
'@img/sharp-win32-ia32': 0.33.5
|
||||||
'@img/sharp-win32-x64': 0.33.5
|
'@img/sharp-win32-x64': 0.33.5
|
||||||
optional: true
|
|
||||||
|
|
||||||
shebang-command@2.0.0:
|
shebang-command@2.0.0:
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -4084,7 +4082,6 @@ snapshots:
|
|||||||
simple-swizzle@0.2.2:
|
simple-swizzle@0.2.2:
|
||||||
dependencies:
|
dependencies:
|
||||||
is-arrayish: 0.3.2
|
is-arrayish: 0.3.2
|
||||||
optional: true
|
|
||||||
|
|
||||||
sisteransi@1.0.5: {}
|
sisteransi@1.0.5: {}
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
---
|
---
|
||||||
import Base from "../layouts/Base.astro";
|
import Base from "../layouts/Base.astro";
|
||||||
import NavBar from "../components/NavBar.astro";
|
import NavBar from "../components/NavBar.astro";
|
||||||
import Content from "../layouts/Content.astro";
|
|
||||||
---
|
---
|
||||||
|
|
||||||
<Base title="Firmament Texture Packs">
|
<Base title="Firmament Texture Packs">
|
||||||
|
|||||||
Reference in New Issue
Block a user