resource-previewed #260072
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: Run preview index for single path | |
on: | |
workflow_dispatch: # Allow manual trigger | |
repository_dispatch: | |
types: | |
- resource-previewed | |
jobs: | |
print: | |
runs-on: ubuntu-latest | |
steps: | |
- run: | | |
echo "Status: ${{ github.event.client_payload.status }}" | |
echo "Path: ${{ github.event.client_payload.path }}" | |
run-preview-index-single: | |
name: Run preview index for single path | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [18.x] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Install XVFB | |
run: sudo apt-get install xvfb | |
- name: Install dependencies | |
run: | | |
cd .github/preview-index | |
npm install | |
- name: Reindex preview resource | |
run: | | |
cd .github/preview-index | |
npm run single --path=${{ github.event.client_payload.path }} | |
env: | |
SHAREPOINT_CLIENT_ID: ${{ secrets.SHAREPOINT_CLIENT_ID }} | |
SHAREPOINT_TENANT_ID: ${{ secrets.SHAREPOINT_TENANT_ID }} | |
SHAREPOINT_CLIENT_SECRET: ${{ secrets.SHAREPOINT_CLIENT_SECRET }} | |
SHAREPOINT_DRIVE_ID: ${{secrets.SHAREPOINT_DRIVE_ID}} | |
EDS_ADMIN_KEY: ${{secrets.EDS_ADMIN_KEY}} | |
CONSUMER: ${{vars.CONSUMER}} | |
PREVIEW_INDEX_FILE: ${{vars.PREVIEW_INDEX_FILE}} | |
ENABLED: ${{vars.ENABLED}} | |
PREVIEW_INDEX_JSON: ${{vars.PREVIEW_INDEX_JSON}} |