Skip to content

添加多語言支援和其他重構 #1

添加多語言支援和其他重構

添加多語言支援和其他重構 #1

Workflow file for this run

name: Deploy
on:
push:
branches:
- main
paths:
- '.github/workflows/deploy.yml'
- 'packages.json'
- 'package-lock.json'
- 'src/**'
- 'Cargo.lock'
- 'Cargo.toml'
workflow_dispatch:
jobs:
build-and-deploy:
if: github.repository == 'igncp/writing-trainer' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
- uses: cachix/install-nix-action@v22
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Install 🚧
run: |
touch ./is-ci
nix develop path:$(pwd) -c rustup install stable
nix develop path:$(pwd) -c cargo build --release # This speeds up the next steps
nix develop path:$(pwd) -c npm install
- name: Check 🔧
run: |
cp .env.example .env
nix develop path:$(pwd) -c bash scripts/check.sh
- name: Build and publish docker image
run: |
cp .env.example .env
nix develop path:$(pwd) -c bash -c scripts/ci/build_docker.sh