aboutsummaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2024-11-17 04:21:10 +0100
committerLinnea Gräf <nea@nea.moe>2024-11-17 04:27:36 +0100
commit9f7cb2c0265d1c3adcf58652a43355dbc7f73378 (patch)
tree036429d1d1111f125d77e8fb152b13f54c6e46a0 /.github
parent430ef35386e79386f84665f6bd8d54c31e45e018 (diff)
downloadFirmament-9f7cb2c0265d1c3adcf58652a43355dbc7f73378.tar.gz
Firmament-9f7cb2c0265d1c3adcf58652a43355dbc7f73378.tar.bz2
Firmament-9f7cb2c0265d1c3adcf58652a43355dbc7f73378.zip
chore: Add website auto build using github pages
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/publish-website.yml48
1 files changed, 48 insertions, 0 deletions
diff --git a/.github/workflows/publish-website.yml b/.github/workflows/publish-website.yml
new file mode 100644
index 0000000..f492738
--- /dev/null
+++ b/.github/workflows/publish-website.yml
@@ -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