Document the embedded sign-in form #2
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 Preview | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| concurrency: | |
| group: eeid-doc-preview-${{ github.event.pull_request.number }} | |
| cancel-in-progress: true | |
| jobs: | |
| deploy-preview: | |
| runs-on: ubuntu-latest | |
| env: | |
| ruby-version: '3.0' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: ${{ env.ruby-version }} | |
| - uses: actions/cache@v3 | |
| with: | |
| path: vendor/bundle | |
| key: gems-${{ runner.os }}-${{ env.ruby-version }}-${{ hashFiles('**/Gemfile.lock') }} | |
| restore-keys: | | |
| gems-${{ runner.os }}-${{ env.ruby-version }}- | |
| gems-${{ runner.os }}- | |
| - run: bundle config set deployment 'true' | |
| - name: bundle install | |
| run: | | |
| bundle config path vendor/bundle | |
| bundle install --jobs 4 --retry 3 | |
| - run: bundle exec middleman build | |
| - name: Deploy preview | |
| uses: peaceiris/actions-gh-pages@v3 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./build | |
| destination_dir: previews/pr-${{ github.event.pull_request.number }} | |
| keep_files: true | |
| - name: Add preview access note | |
| run: | | |
| preview_url="https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}/previews/pr-${{ github.event.pull_request.number }}/" | |
| { | |
| echo "## Docs Preview" | |
| echo | |
| echo "Preview deployed successfully." | |
| echo | |
| echo "Access it here: ${preview_url}" | |
| } >> "$GITHUB_STEP_SUMMARY" | |
| - name: Comment preview URL | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| const previewUrl = `https://${context.repo.owner}.github.io/${context.repo.repo}/previews/pr-${context.issue.number}/`; | |
| const body = `## Docs Preview\n\nPreview deployed successfully.\n\nAccess it here: ${previewUrl}`; | |
| await github.rest.issues.createComment({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| issue_number: context.issue.number, | |
| body | |
| }); |