diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 1e029c4..cf8bb1a 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -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: @@ -23,13 +25,13 @@ 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 + npm install + npm run build # - name: Install, build, and upload your site # uses: withastro/action@v0 # with: @@ -48,7 +50,7 @@ jobs: run: npx tinacms 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 diff --git a/.github/workflows/pr-open.yml b/.github/workflows/pr-open.yml deleted file mode 100644 index eddc7c7..0000000 --- a/.github/workflows/pr-open.yml +++ /dev/null @@ -1,23 +0,0 @@ -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 - steps: - - uses: actions/checkout@v3 - - name: Setup node - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node }} - - run: yarn install - - run: yarn build diff --git a/package.json b/package.json index 8d618b6..2fcde2c 100644 --- a/package.json +++ b/package.json @@ -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"