Skip to content

Commit

Permalink
fix build & deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
ewangler committed Nov 18, 2023
1 parent 5b46eb4 commit 4347aa9
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 45 deletions.
32 changes: 11 additions & 21 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ on:
branches: [ main ]
# Allows you to run this workflow manually from the Actions tab on GitHub.
workflow_dispatch:
pull_request:
types: [opened, synchronize, reopened]

# Allow this job to clone the repo and create a page deployment
permissions:
Expand All @@ -20,35 +22,23 @@ jobs:
steps:
- name: Checkout your repository using git
uses: actions/checkout@v3
env:
NEXT_PUBLIC_TINA_CLIENT_ID: ${{ secrets.TINA_PUBLIC_CLIENT_ID }}
TINA_TOKEN: ${{ secrets.TINA_TOKEN }}
NEXT_PUBLIC_TINA_BRANCH: main
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18
cache: 'yarn'
node-version: 20
cache: 'npm'
- name: Install and build astro
shell: 'bash'
run: |
yarn
yarn build
# - name: Install, build, and upload your site
# uses: withastro/action@v0
# with:
# path: . # The root location of your Astro project inside the repository. (optional)
# node-version: 16 # The specific version of Node that should be used to build your site. Defaults to 16. (optional)
# package-manager: yarn # The Node package manager that should be used to install dependencies and build your site. Automatically detected based on your lockfile. (optional)
- name: Install TinaCMS
working-directory: backend
run: npm ci
- name: Build TinaCMS
working-directory: backend
env:
NEXT_PUBLIC_TINA_CLIENT_ID: ${{ secrets.TINA_PUBLIC_CLIENT_ID }}
TINA_TOKEN: ${{ secrets.TINA_TOKEN }}
NEXT_PUBLIC_TINA_BRANCH: main
run: npx tinacms build
npm install
npm run build
- name: Copy TinaCMS artifacts
run: |
cp -R ./backend/public/it-landscape/admin/ ./dist/
cp -R ./public/it-landscape/admin/ ./dist/
rm ./dist/admin/.gitignore
- name: Create Pages Artifact
uses: actions/upload-pages-artifact@v1
Expand Down
23 changes: 0 additions & 23 deletions .github/workflows/pr-open.yml

This file was deleted.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"private": true,
"scripts": {
"dev": "tinacms dev -c \"next dev & astro dev\"",
"tina": "tinacms dev -c \"next dev & astro dev\"",
"build": "tinacms build && next build",
"start": "tinacms build && next start",
"lint": "next lint"
Expand Down

0 comments on commit 4347aa9

Please sign in to comment.