Switch from GitHub Pages to Netlify deployment and fix CMS setup

- Remove GitHub Pages workflow (no longer needed)
- Update Decap CMS config with correct Netlify domain (taslak.radio.org.tr)
- Add comprehensive troubleshooting guide for 'Unable to access identity settings' error
- Provide step-by-step Netlify Identity and Git Gateway setup instructions
- Include verification steps and common issues resolution

The error occurs because Netlify Identity service needs to be enabled in the Netlify dashboard.

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Buğra
2025-07-10 02:54:12 +03:00
parent a9dce67054
commit db63a8f4d8
3 changed files with 66 additions and 109 deletions
-90
View File
@@ -1,90 +0,0 @@
# Sample workflow for building and deploying an Astro site to GitHub Pages
#
# To get started with Astro see: https://docs.astro.build/en/getting-started/
#
name: Deploy Astro site to Pages
on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
env:
BUILD_PATH: "." # default value when not using subfolders
# BUILD_PATH: subfolder
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Detect package manager
id: detect-package-manager
run: |
if [ -f "${{ github.workspace }}/yarn.lock" ]; then
echo "manager=yarn" >> $GITHUB_OUTPUT
echo "command=install" >> $GITHUB_OUTPUT
echo "runner=yarn" >> $GITHUB_OUTPUT
echo "lockfile=yarn.lock" >> $GITHUB_OUTPUT
exit 0
elif [ -f "${{ github.workspace }}/package.json" ]; then
echo "manager=npm" >> $GITHUB_OUTPUT
echo "command=ci" >> $GITHUB_OUTPUT
echo "runner=npx --no-install" >> $GITHUB_OUTPUT
echo "lockfile=package-lock.json" >> $GITHUB_OUTPUT
exit 0
else
echo "Unable to determine package manager"
exit 1
fi
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "20"
cache: ${{ steps.detect-package-manager.outputs.manager }}
cache-dependency-path: ${{ env.BUILD_PATH }}/${{ steps.detect-package-manager.outputs.lockfile }}
- name: Setup Pages
id: pages
uses: actions/configure-pages@v5
- name: Install dependencies
run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }}
working-directory: ${{ env.BUILD_PATH }}
- name: Build with Astro
run: |
${{ steps.detect-package-manager.outputs.runner }} astro build \
--site "${{ steps.pages.outputs.origin }}" \
--base "${{ steps.pages.outputs.base_path }}"
working-directory: ${{ env.BUILD_PATH }}
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ${{ env.BUILD_PATH }}/dist
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
needs: build
runs-on: ubuntu-latest
name: Deploy
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
+64 -17
View File
@@ -4,35 +4,57 @@
This website uses Decap CMS (formerly Netlify CMS) for content management. It allows authorized users to create, edit, and manage blog posts through a web interface. This website uses Decap CMS (formerly Netlify CMS) for content management. It allows authorized users to create, edit, and manage blog posts through a web interface.
## Current Setup Status
**Error**: "Unable to access identity settings. When using git-gateway backend make sure to enable Identity service and Git Gateway."
This means Netlify Identity and Git Gateway need to be properly configured.
## Setup Instructions ## Setup Instructions
### 1. Enable Netlify Identity ### 1. Enable Netlify Identity
1. Go to your Netlify dashboard 1. Go to your Netlify dashboard: https://app.netlify.com/
2. Navigate to your site settings 2. Select your site (ym1ktc.netlify.app)
3. Go to "Identity" tab 3. Navigate to **Site settings****Identity**
4. Click "Enable Identity" 4. Click **"Enable Identity"**
5. In Identity settings, configure: 5. In Identity settings, configure:
- Registration: "Invite only" (recommended) - **Registration**: Set to "Invite only" (recommended for security)
- External providers: Enable GitHub, Google, etc. as needed - **External providers**: Optionally enable GitHub, Google, etc.
- Git Gateway: Enable this service - **Field validation**: No changes needed for basic setup
### 2. Configure Git Gateway ### 2. Configure Git Gateway
**This is the crucial step that's currently missing:**
1. In your site's Identity settings 1. In your site's Identity settings
2. Go to "Services" tab 2. Go to **"Services"** tab
3. Enable "Git Gateway" 3. Click **"Enable Git Gateway"**
4. This allows Decap CMS to commit directly to your GitHub repository 4. This allows Decap CMS to commit directly to your GitHub repository
5. **Important**: Git Gateway requires the Identity service to be enabled first
### 3. Invite Users ### 3. Configure Custom Domain Access
1. In Identity tab, click "Invite users" Since you're using https://taslak.radio.org.tr/, ensure:
1. The custom domain is properly configured in Netlify
2. Identity service works on both domains:
- https://ym1ktc.netlify.app/admin/
- https://taslak.radio.org.tr/admin/
### 4. Invite Users
After Identity and Git Gateway are enabled:
1. In Identity tab, click **"Invite users"**
2. Enter email addresses of content editors 2. Enter email addresses of content editors
3. They will receive invitation emails 3. They will receive invitation emails
4. Users must accept invitations to access the CMS
### 4. Access the CMS ### 5. Access the CMS
- CMS URL: `https://your-site.netlify.app/admin/` - Primary URL: `https://taslak.radio.org.tr/admin/`
- Backup URL: `https://ym1ktc.netlify.app/admin/`
- Users can log in with their invited credentials - Users can log in with their invited credentials
- The CMS will redirect to `/decapcms/` for the actual interface - The CMS will redirect to `/decapcms/` for the actual interface
@@ -96,13 +118,38 @@ Netlify redirect rules for admin routing
## Troubleshooting ## Troubleshooting
### Current Error: "Unable to access identity settings"
**This specific error means:**
- Netlify Identity service is not enabled on your site
- Git Gateway is not enabled
- Or both services need to be configured
**Solution steps:**
1. Go to https://app.netlify.com/sites/ym1ktc/settings/identity
2. If Identity is not enabled, click "Enable Identity"
3. Go to Services tab and enable "Git Gateway"
4. Wait a few minutes for services to activate
5. Try accessing `/admin/` again
### Common Issues: ### Common Issues:
1. **Can't log in**: Check if Identity is enabled and user is invited 1. **"Unable to access identity settings"**: Enable Identity service and Git Gateway in Netlify dashboard
2. **Can't save posts**: Ensure Git Gateway is enabled 2. **Can't log in**: Check if Identity is enabled and user is invited
3. **Images not uploading**: Check media folder permissions 3. **Can't save posts**: Ensure Git Gateway is enabled and connected to GitHub
4. **Changes not deploying**: Verify GitHub Actions workflow 4. **Images not uploading**: Check media folder permissions in repository
5. **Custom domain issues**: Ensure Identity works on both netlify.app and custom domain
6. **404 on /admin/**: Check that _redirects file is deployed correctly
### Quick Verification Steps:
1. Check Identity status: https://app.netlify.com/sites/ym1ktc/settings/identity
2. Check Git Gateway: Should show "Connected" status when properly configured
3. Test admin access: https://taslak.radio.org.tr/admin/
4. Check browser console for JavaScript errors
### Support ### Support
For technical issues, contact the development team or check the Decap CMS documentation at https://decapcms.org/docs/ For technical issues, contact the development team or check the Decap CMS documentation at https://decapcms.org/docs/
**Netlify-specific help:** https://docs.netlify.com/visitor-access/identity/
+2 -2
View File
@@ -5,8 +5,8 @@ backend:
media_folder: 'src/assets/images' media_folder: 'src/assets/images'
public_folder: '/_astro' public_folder: '/_astro'
site_url: https://ym1ktc.github.io/ARC-Web-Sitesi site_url: https://taslak.radio.org.tr
display_url: https://ym1ktc.github.io/ARC-Web-Sitesi display_url: https://taslak.radio.org.tr
collections: collections:
- name: 'post' - name: 'post'