Remove no longer needed ts-ignore #530
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: Deploy to development env | |
on: | |
push: | |
branches: | |
- dev | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
environment: development | |
steps: | |
- name: Install SSH Key | |
uses: kielabokkie/ssh-key-and-known-hosts-action@v1 | |
with: | |
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} | |
ssh-host: ${{ secrets.SSH_HOST_NEW_IP }} | |
ssh-port: ${{ secrets.SSH_HOST_NEW_PORT }} | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- name: Setup Bun | |
uses: oven-sh/setup-bun@v2 | |
with: | |
bun-version: latest | |
- name: Install dependencies | |
run: bun install --frozen-lockfile | |
- name: Run linter & formatter | |
run: bun run check | |
- name: Run tests | |
run: bun test | |
- name: Run TypeScript typecheck | |
run: bun run typecheck | |
- name: Set git commit | |
run: echo "VITE_GIT_COMMIT=$(git rev-parse --short HEAD)" >> $GITHUB_ENV | |
- name: Build app (main) | |
env: | |
VITE_ENV: development | |
VITE_OSM_API_URL: "https://master.apis.dev.openstreetmap.org" | |
VITE_OSM_OAUTH2_CLIENT_ID: ${{ secrets.REACT_APP_OSM_OAUTH2_CLIENT_ID }} | |
VITE_BACKEND_API_URL: "https://dev.openaedmap.org" | |
VITE_SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | |
run: bun run build | |
- name: Create robots.txt | |
run: | | |
cat << 'EOF' > build/robots.txt | |
# https://www.robotstxt.org/robotstxt.html | |
User-agent: * | |
Disallow: / | |
EOF | |
- name: Copy result to server | |
run: | | |
rsync -rp --delete -e 'ssh -p ${{ secrets.SSH_HOST_NEW_PORT }}' build/* ${{ secrets.SSH_USER_NEW }}@${{ secrets.SSH_HOST_NEW_IP }}:~/dev-static/ |