name: Deploy Theme on: push: branches: - main jobs: deploy: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Set up pnpm uses: pnpm/action-setup@v3 with: version: 10.28.0 - name: Set up Node.js uses: actions/setup-node@v4 with: node-version: '20' - name: Install dependencies run: pnpm install - name: Create Ghost Config run: | echo "window.GhostConfig = { ghostApiKey: '${{ secrets.GHOST_CONTENT_API_KEY }}', ghostApiUrl: '${{ secrets.GHOST_ADMIN_API_URL }}' };" > assets/js/ghost-config.js - name: Build theme run: pnpm build - name: Deploy Ghost Theme uses: TryGhost/action-deploy-theme@v1 with: api-url: ${{ secrets.GHOST_ADMIN_API_URL }} api-key: ${{ secrets.GHOST_ADMIN_API_KEY }}