fix: error in add menu #351
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 Static App | |
on: | |
push: | |
branches: | |
- 'main' | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
jobs: | |
deploy_backend_image: | |
# run only when code is compiling and tests are passing | |
runs-on: ubuntu-latest | |
# steps to perform in job | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
# setup Docker buld action | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Log in to registry | |
# This is where you will update the PAT to GITHUB_TOKEN | |
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin | |
- name: Build and publish a Docker image for ${{ github.repository }} | |
uses: macbre/push-to-ghcr@master | |
with: | |
image_name: jimfx/plantarium-backend # it will be lowercased internally | |
dockerfile: apps/backend/Dockerfile | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
- uses: superfly/flyctl-actions/setup-flyctl@master | |
- name: 'Deploy to fly.io' | |
run: flyctl deploy --remote-only | |
env: | |
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} | |
deploy_gh_pages: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: '18.7.0' | |
- uses: pnpm/[email protected] | |
name: Install pnpm | |
id: pnpm-install | |
with: | |
version: 7 | |
run_install: false | |
- name: Get pnpm store directory | |
id: pnpm-cache | |
run: | | |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)" | |
- uses: actions/cache@v3 | |
name: Setup pnpm cache | |
with: | |
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }} | |
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-pnpm-store- | |
- run: 'pnpm i && pnpm build' | |
env: | |
IS_GH_PAGES: true | |
VITE_API_URL: ${{ secrets.API_URL }} | |
- run: 'cp -r apps/admin/build apps/frontend/build/admin' | |
- run: 'cp -r packages/ui/build apps/frontend/build/ui' | |
- run: 'cp -r packages/nodesystem/build apps/frontend/build/nodes' | |
- run: 'cp -r packages/geometry/build apps/frontend/build/geometry' | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v2 | |
with: | |
path: ./apps/frontend/build | |
- name: Deploy 🚀 | |
uses: actions/deploy-pages@v2 |