Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

danielbayley/qwik-build

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

Qwik Build

GitHub Action to build your Qwik[City] static site for GitHub Pages.

Usage

First enable GitHub Pages under your repository Settings > Pages by changing the source to GitHub Actions:

screenshot

This action will look in package.[yaml/json] scripts for the first script containing a qwikbuild command and run it with [p]npm or yarn, as appropriate:

// package.json
"devDependencies": {
 "@builder.io/qwik": "^1.x",
 "eslint": "^8.x",
 "vite": "^5.x"
},
"scripts": {
 "lint": "eslint .",
 "build": "qwik build", // [p]npm/yarn run build
 "dev": "vite --mode ssr"
}

it will also configure Qwik for static site generation, unless you already run qwik add static.

Because it runs the appropriate build script, support for Civet —a language that compiles to TypeScript and JSX—can be added:

# package.yaml
packageManager: pnpm@8.12.1
devDependencies:
 "@builder.io/qwik": ^1.x
 "@danielx/civet": ^0.x
scripts:
 prebuild: civet --compile src/**/*.civet --output .tsx
 build: qwik build # pnpm run build

Although a more official integration is preferred.

Options

inputs Default Description
access-token github.token Provide a token with permission to automatically enable Pages. Generate an access token, then add to your repo secrets.
branch github.ref_name Optionally specify a particular branch of your repository.
working-dir github.workspace Optionally specify a subfolder containing source files.
build-dir dist Optionally specify an alternative build folder.
node-version Optionally specify a SemVer range or particular version of Node.js .
node-version-file package.json Optionally specify a file containing the correct version of Node.

Example

.github/workflows/pages.yml:

on:
 push:
 branches: site
permissions:
 pages: write
 id-token: write
concurrency:
 group: pages
 cancel-in-progress: false
jobs:
 build:
 runs-on: ubuntu-latest
 environment:
 name: github-pages
 url: ${{ steps.qwik-build.outputs.page-url }}
 steps:
 - name: Qwik Build
 id: qwik-build
 uses: danielbayley/qwik-build@v1
 with:
 branch: site

License

MIT © Daniel Bayley

Packages

No packages published

AltStyle によって変換されたページ (->オリジナル) /