Merge pull request #329 from tokk-nv/fix/mobile-hero-image-sizing #332
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
| # CI/CD Pipeline for Astro site deployment to GitHub Pages | |
| # Following Astro's recommended build process: https://docs.astro.build/en/develop-and-build/ | |
| name: Deploy Astro to GitHub Pages | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - master | |
| workflow_dispatch: | |
| 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: "." | |
| jobs: | |
| build: | |
| name: Build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| cache: npm | |
| cache-dependency-path: ${{ env.BUILD_PATH }}/package-lock.json | |
| - name: Setup Pages | |
| id: pages | |
| uses: actions/configure-pages@v5 | |
| # Install dependencies using npm ci for clean, reproducible builds | |
| - name: Install dependencies | |
| run: npm ci | |
| working-directory: ${{ env.BUILD_PATH }} | |
| # Display Astro version for debugging | |
| - name: Get Astro version | |
| run: npx astro --version | |
| working-directory: ${{ env.BUILD_PATH }} | |
| # Build the Astro site | |
| # Astro outputs to dist/ by default | |
| # --site and --base are passed to configure for GitHub Pages URL structure | |
| - name: Build with Astro | |
| run: | | |
| npm run build \ | |
| -- \ | |
| --site "${{ steps.pages.outputs.origin }}" \ | |
| --base "${{ steps.pages.outputs.base_path }}" | |
| working-directory: ${{ env.BUILD_PATH }} | |
| # Upload the dist/ folder as a GitHub Pages artifact | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: ${{ env.BUILD_PATH }}/dist | |
| deploy: | |
| name: Deploy | |
| needs: build | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |