-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
da27d54
commit 5fca72d
Showing
29 changed files
with
984 additions
and
103 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
name: Build Frontend | ||
|
||
on: | ||
push: | ||
branches: | ||
- '**' | ||
tags-ignore: | ||
- 'v*' | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
IMAGE_NAME: ${{ github.repository }} | ||
|
||
jobs: | ||
docker-build: | ||
runs-on: ubuntu-latest | ||
|
||
name: Docker image build | ||
|
||
permissions: | ||
packages: write | ||
contents: read | ||
|
||
steps: | ||
# Checkout the repository code | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: '0' | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Login to the Docker registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- id: string | ||
name: Lowercase the name | ||
uses: AsZc/change-string-case-action@v6 | ||
with: | ||
string: ${{ env.IMAGE_NAME }} | ||
|
||
- name: Extract metadata (tags, labels) for Docker | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
tags: | | ||
type=raw,value=latest,enable={{is_default_branch}} | ||
type=schedule,pattern={{date 'YYYYMMDD-hhmmss' tz='Europe/Berlin'}} | ||
type=semver,enable=true,priority=900,prefix=,suffix=,pattern=,value= | ||
type=sha,prefix={{branch}} | ||
flavor: | | ||
latest=auto | ||
suffix=-${{ matrix.environment.name }},onlatest=true | ||
images: '${{ env.REGISTRY }}/${{ steps.string.outputs.lowercase }}' | ||
|
||
- name: Build and push | ||
uses: docker/build-push-action@v6 | ||
if: github.event_name != 'pull_request' | ||
with: | ||
push: 'true' | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
annotations: ${{ steps.meta.outputs.annotations }} | ||
build-args: ${{ matrix.environment.docker-build-args }} | ||
platforms: linux/amd64,linux/arm64 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
name: Publish docs | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
# Checkout the repository code | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: '0' | ||
|
||
# Enable Corepack | ||
- name: Enable Corepack | ||
run: corepack enable | ||
|
||
# Set up Python environment | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.x' | ||
|
||
# Install dependencies (MkDocs and Material theme) | ||
- name: Install dependencies | ||
run: | | ||
pip install mkdocs-material | ||
# Set up Node.js environment | ||
- name: Set up Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '22' # Specify the Node.js version you need | ||
|
||
- name: Install dependencies | ||
run: | | ||
yarn | ||
- name: Build Storybook | ||
run: | | ||
yarn storybook:build | ||
# Move Storybook to MkDocs site directory | ||
- name: Move Storybook to MkDocs site | ||
run: | | ||
mkdir -p site/ | ||
mv storybook-static site/storybook | ||
# Build and deploy the site to GitHub Pages | ||
- name: Deploy to GitHub Pages | ||
run: | | ||
git remote set-url origin https://x-access-token:${GH_TOKEN}@github.com/vymalo/template-backend-rust-axum.git | ||
mkdocs gh-deploy --force -m "chore: deploy documentation #{sha}" --dirty |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Lint | ||
|
||
on: # yamllint disable-line rule:truthy | ||
push: null | ||
pull_request: null | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
lint: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: read | ||
# To report GitHub Actions status checks | ||
statuses: write | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: '0' | ||
|
||
- name: Run ESLint and post results | ||
uses: super-linter/super-linter@v7 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
Oops, something went wrong.