feat(core): add onUnauthorized
callback to <CanAccess />
component
#6354
Workflow file for this run
This file contains 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: PR Documentation [synchronize] | |
on: | |
pull_request: | |
types: | |
- synchronize | |
- opened | |
- reopened | |
paths: | |
- "documentation/**" | |
jobs: | |
documentation: | |
runs-on: ubuntu-latest | |
concurrency: | |
group: ${{ github.ref }}-pr-doc | |
cancel-in-progress: true | |
strategy: | |
matrix: | |
node-version: [18.x] | |
name: Deploy Documentation Preview | |
steps: | |
- name: Workflow run cleanup action | |
uses: rokroskar/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- uses: actions/checkout@v3 | |
- name: Add key to allow access to repository | |
env: | |
SSH_AUTH_SOCK: /tmp/ssh_agent.sock | |
run: | | |
mkdir -p ~/.ssh | |
ssh-keyscan github.com >> ~/.ssh/known_hosts | |
echo "${{ secrets.GH_PAGES_DEPLOY }}" > ~/.ssh/id_rsa | |
chmod 600 ~/.ssh/id_rsa | |
cat <<EOT >> ~/.ssh/config | |
Host github.com | |
HostName github.com | |
IdentityFile ~/.ssh/id_rsa | |
EOT | |
- name: Install Package Dependencies | |
run: | | |
npm ci | |
npm run bootstrap:all | |
- name: Install Doc Dependencies | |
run: | | |
cd documentation | |
npm ci | |
- name: Wait for Netlify Deploy (Live Previews) | |
uses: probablyup/[email protected] | |
id: waitForDeployment | |
continue-on-error: true | |
with: | |
site_id: ${{ secrets.NETLIFY_PREVIEW_SITE_ID }} | |
max_timeout: 1200 | |
env: | |
NETLIFY_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | |
- name: output test | |
run: | | |
echo ${{ steps.waitForDeployment.outputs.url }} | |
- name: Build Documentation | |
run: | | |
cd documentation | |
LIVE_PREVIEW_URL=${{ steps.waitForDeployment.outputs.url }}/preview npm run build | |
- name: Deploy to Netlify | |
uses: nwtgck/[email protected] | |
with: | |
publish-dir: "./documentation/build" | |
github-token: ${{ secrets.PANKOD_BOT_TOKEN }} | |
deploy-message: "Deploy from GitHub Actions" | |
enable-pull-request-comment: false | |
overwrites-pull-request-comment: false | |
github-deployment-environment: "deploy-preview-website-${{ github.event.number }}" | |
env: | |
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | |
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} | |
timeout-minutes: 15 |