Add versioned docs for v0.3.9 and update config #10
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 React to GitHub Pages | |
| on: | |
| push: | |
| branches: | |
| - main # Triggers the workflow on pushes to the main branch | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' # Use a stable Node.js version | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build React application | |
| run: npm run build # Builds your app into the 'build' or 'dist' folder | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: './build' # Path to your built application's static files (e.g., 'dist' for Vite, 'build' for CRA) | |
| deploy: | |
| needs: build # Ensures the build job completes first | |
| runs-on: ubuntu-latest | |
| permissions: | |
| pages: write # Grants the GITHUB_TOKEN write permission for Pages | |
| id-token: write # Required by the deploy-pages action | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} # Sets the deployment environment and URL | |
| steps: | |
| - name: Setup Pages | |
| uses: actions/configure-pages@v5 # This action configures the GitHub Pages environment | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 # This action deploys the uploaded artifact |