feat: support form themes (#155) #128
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Publish | |
permissions: | |
contents: write # for release | |
pages: write | |
id-token: write | |
on: | |
push: | |
branches: [main] | |
jobs: | |
backend-tests: | |
name: "Go Build/Test" | |
uses: ./.github/workflows/partial-tests.yml | |
tag: | |
name: "Publish Tag" | |
runs-on: ubuntu-latest | |
needs: | |
- backend-tests | |
steps: | |
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4 | |
- uses: actions-ecosystem/action-get-latest-tag@v1 | |
id: get-latest-tag | |
- uses: actions-ecosystem/action-bump-semver@v1 | |
id: bump-semver | |
with: | |
current_version: ${{ steps.get-latest-tag.outputs.tag }} | |
level: patch | |
- uses: actions-ecosystem/action-push-tag@v1 | |
with: | |
tag: ${{ steps.bump-semver.outputs.new_version }} | |
message: "${{ steps.bump-semver.outputs.new_version }}: PR #${{ github.event.pull_request.number }} ${{ github.event.pull_request.title }}" | |
goreleaser: | |
name: "Publish Release" | |
needs: | |
- tag | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4 | |
with: | |
fetch-depth: 0 | |
- run: git fetch --force --tags | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: ">=1.22.0" | |
cache: true | |
- uses: goreleaser/goreleaser-action@v5 | |
with: | |
distribution: goreleaser | |
version: latest | |
args: release --rm-dist | |
env: | |
GITHUB_TOKEN: ${{ secrets.PUBLISH_TOKEN }} | |
build-docs: | |
runs-on: ubuntu-latest | |
needs: | |
- goreleaser | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # Not needed if lastUpdated is not enabled | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: npm # or pnpm / yarn | |
cache-dependency-path: "docs" | |
- name: Setup Pages | |
uses: actions/configure-pages@v4 | |
- name: Install dependencies | |
working-directory: docs | |
run: npm ci | |
- name: Build with VitePress | |
working-directory: docs | |
run: npm run build | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: docs/docs/.vitepress/dist | |
# Deployment job | |
deploy-docs: | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
needs: | |
- build-docs | |
runs-on: ubuntu-latest | |
name: Deploy | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |