diff --git a/.github/workflows/deploy-landing.yml b/.github/workflows/deploy-landing.yml index db524aeb..cd71a491 100644 --- a/.github/workflows/deploy-landing.yml +++ b/.github/workflows/deploy-landing.yml @@ -1,4 +1,4 @@ -name: Deploy Landing to GitHub Pages +name: Build Landing Site to Docs on: push: @@ -9,13 +9,7 @@ on: workflow_dispatch: permissions: - contents: read - pages: write - id-token: write - -concurrency: - group: 'pages' - cancel-in-progress: true + contents: write jobs: build: @@ -35,19 +29,16 @@ jobs: npm ci npm run build - - name: Upload artifact - uses: actions/upload-pages-artifact@v3 - with: - path: web/landing/dist - - deploy: - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - runs-on: ubuntu-latest - needs: build - steps: - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v4 + - name: Deploy to docs folder + run: | + rm -rf docs + mv web/landing/dist docs + + - name: Commit and push + run: | + git config --local user.email "action@github.com" + git config --local user.name "GitHub Action" + git add docs + git diff --staged --quiet || git commit -m "Deploy landing site to docs folder" + git push diff --git a/docs/API_DOCS.md b/api-docs/API_DOCS.md similarity index 100% rename from docs/API_DOCS.md rename to api-docs/API_DOCS.md diff --git a/docs/docs.go b/api-docs/docs.go similarity index 100% rename from docs/docs.go rename to api-docs/docs.go diff --git a/docs/swagger.json b/api-docs/swagger.json similarity index 100% rename from docs/swagger.json rename to api-docs/swagger.json diff --git a/docs/swagger.yaml b/api-docs/swagger.yaml similarity index 100% rename from docs/swagger.yaml rename to api-docs/swagger.yaml diff --git a/web/landing/package.json b/web/landing/package.json index 609a6edd..9ad3725b 100644 --- a/web/landing/package.json +++ b/web/landing/package.json @@ -4,7 +4,7 @@ "version": "0.0.2", "type": "module", "scripts": { - "sync:spec": "cp -f ../../docs/swagger.json public/api/swagger.json", + "sync:spec": "cp -f ../../api-docs/swagger.json public/api/swagger.json", "sync:undoc": "node ./scripts/gen-endpoints.mjs", "dev": "npm run sync:spec && npm run sync:undoc && vite", "build": "npm run sync:spec && npm run sync:undoc && tsc -b && vite build",