Skip to content

Commit

Permalink
Merge pull request #4 from scout-ch/feature/restructure-tina-astro
Browse files Browse the repository at this point in the history
restructure tina & astro
  • Loading branch information
ewangler authored Nov 18, 2023
2 parents 63b2b50 + 21d9f70 commit 03dd8a2
Show file tree
Hide file tree
Showing 93 changed files with 20,056 additions and 34,108 deletions.
File renamed without changes.
24 changes: 6 additions & 18 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,32 +23,20 @@ jobs:
- 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
run: |
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
16 changes: 5 additions & 11 deletions .github/workflows/pr-open.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,17 @@

name: Build Pull request
on:
pull_request:
types: [opened, synchronize, reopened]
env:
NEXT_PUBLIC_TINA_CLIENT_ID: ${{ secrets.NEXT_PUBLIC_TINA_CLIENT_ID }}
TINA_TOKEN: ${{ secrets.TINA_TOKEN }}
NEXT_PUBLIC_TINA_BRANCH: ${{ github.head_ref }}
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node: ["14", "16", "17"]
name: Node ${{ matrix.node }} sample
name: build astro
steps:
- uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- run: yarn install
- run: yarn build
node-version: 20
- run: npm install
- run: npm run build-astro
38 changes: 26 additions & 12 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,21 +1,35 @@
# build output
dist/

# generated types
.astro/
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
node_modules/
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# logs
# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*

# environment variables
# local env files
.env
.env.production
.env.local
.env.development.local
.env.test.local
.env.production.local

# macOS-specific files
.DS_Store
# vercel
.vercel
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions .tina/__generated__/_graphql.json

Large diffs are not rendered by default.

File renamed without changes.
1 change: 1 addition & 0 deletions .tina/__generated__/_schema.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 03dd8a2

Please sign in to comment.