mirror of
https://github.com/rishikanthc/Scriberr.git
synced 2026-06-28 06:46:25 +00:00
fixes CI/CD
This commit is contained in:
37
.github/workflows/deploy-landing.yml
vendored
37
.github/workflows/deploy-landing.yml
vendored
@@ -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
|
||||
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user