Migrate public work shares to Community V2 #1036
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: Generate community share previews | |
| on: | |
| push: | |
| branches: [main] | |
| paths-ignore: | |
| - "s/**" | |
| - "og/**" | |
| schedule: | |
| # Dynamic edge rendering is immediate. This job only refreshes the static | |
| # fallback and intentionally shares the Community recovery cadence instead | |
| # of waking TableStore every five minutes. | |
| - cron: "17 */6 * * *" | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| concurrency: | |
| group: community-share-previews | |
| cancel-in-progress: true | |
| jobs: | |
| generate: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| - name: Generate pages and cards | |
| run: node scripts/generate-share-pages.mjs | |
| - name: Publish generated assets | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| git add --all s og | |
| if git diff --cached --quiet; then | |
| echo "Generated previews are already current." | |
| exit 0 | |
| fi | |
| git commit -m "Generate community share previews [skip ci]" | |
| git push |