Skip to content

Commit

Permalink
Add CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Zhincore committed Jan 25, 2025
1 parent cffd1bc commit aa38c5d
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 1 deletion.
69 changes: 69 additions & 0 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# Simple workflow for deploying static content to GitHub Pages
name: Deploy to GitHub Pages

on:
# Runs on pushes targeting the default branch
workflow_dispatch:
push:
branches: ["master"]

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
build_site:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v3
with:
version: 9

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm

- name: Install dependencies
run: pnpm install

- name: build
env:
# BASE_PATH: "/${{ github.event.repository.name }}" # Not used because we have custom domain
ORIGIN: "${{ vars.ORIGIN }}"
run: pnpm build

- name: Upload Artifacts
uses: actions/upload-pages-artifact@v3
with:
path: "dist/"

deploy:
needs: build_site
runs-on: ubuntu-latest

permissions:
pages: write
id-token: write

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

steps:
- name: Deploy
id: deployment
uses: actions/deploy-pages@v4
2 changes: 1 addition & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { InfoView } from "./views/InfoView";
import { Dots } from "./components/Dots";

export function App() {
const [token, setToken] = createSignal<string>("e");
const [token, _setToken] = createSignal<string>("e");

return (
<>
Expand Down

0 comments on commit aa38c5d

Please sign in to comment.