added save the princess solution set #101
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
| # Workflow for building a Jekyll site for deployment to GitHub Pages | |
| name: Pages test | |
| # Runs on pull request creation | |
| on: | |
| pull_request: | |
| types: [opened, reopened, synchronize] | |
| # Allows you to run this workflow manually from the Actions tab | |
| workflow_dispatch: | |
| # Sets permissions of the GITHUB_TOKEN | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| # Allow only one concurrent build per PR | |
| concurrency: | |
| group: "build-pages-pr-${{ github.event.pull_request.number || github.run_id }}" | |
| cancel-in-progress: true | |
| jobs: | |
| # Build job | |
| build: | |
| name: Test build pages site | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| lfs: true | |
| - name: Setup Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: '3.1' | |
| bundler-cache: false | |
| - name: Install dependencies | |
| run: make install | |
| - name: Build site with Makefile | |
| run: make build-github | |
| - name: Comment on PR | |
| if: github.event_name == 'pull_request' | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| const prNumber = context.issue.number; | |
| const message = `**Build successful!** | |
| Your preview deployment will be available on Render at: | |
| https://fsa-devops-preview-pr-${prNumber}.onrender.com | |
| Note: Render preview deployments may take a few minutes to become available after the build completes.`; | |
| github.rest.issues.createComment({ | |
| issue_number: prNumber, | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| body: message | |
| }); |