Merge pull request #7 from austrovis/content/workshop-details #36
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Deploy to GitHub Pages | |
| on: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: false | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| cache: "npm" | |
| - name: Setup Pages | |
| uses: actions/configure-pages@v4 | |
| with: | |
| static_site_generator: next | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Debug - Check config files | |
| run: | | |
| echo "=== Checking Next.js config files ===" | |
| ls -la next.config* || echo "No next.config files found" | |
| echo "=== Content of next.config.js ===" | |
| cat next.config.js | |
| echo "=== Git commit info ===" | |
| git log -1 --oneline | |
| - name: Build with Next.js | |
| run: npm run build | |
| env: | |
| NODE_ENV: production | |
| NEXT_PUBLIC_NEWSLETTER_API_URL: ${{ secrets.NEXT_PUBLIC_NEWSLETTER_API_URL }} | |
| NEXT_PUBLIC_REGISTER_API_URL: ${{ secrets.NEXT_PUBLIC_REGISTER_API_URL }} | |
| - name: Verify build output | |
| run: | | |
| echo "Checking if out directory exists..." | |
| ls -la | |
| if [ -d "./out" ]; then | |
| echo "✓ out directory found" | |
| ls -la ./out | |
| else | |
| echo "✗ out directory not found!" | |
| exit 1 | |
| fi | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: ./out | |
| deploy: | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |