Repo sync #1019
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: Move content script test | |
| # This workflow protects npm run move-content from regressions. | |
| on: | |
| pull_request: | |
| paths: | |
| - src/content-render/scripts/move-content.ts | |
| - src/content-render/scripts/test-move-content.ts | |
| - 'src/frame/lib/**/*.js' | |
| - .github/workflows/move-content.yml | |
| # Dependency changes can break the move-content script. | |
| - 'package*.json' | |
| - src/fixtures/fixtures/content/get-started/ | |
| - src/fixtures/fixtures/content/code-security/ | |
| permissions: | |
| contents: read | |
| jobs: | |
| move-content-test: | |
| if: github.repository == 'github/docs-internal' || github.repository == 'github/docs' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repo | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| - uses: ./.github/actions/node-npm-setup | |
| - name: Set up a dummy git user | |
| run: | | |
| # move-content runs git mv and git commit, so Git needs an identity. | |
| git config --global user.name "docs-bot" | |
| git config --global user.email "77750099+docs-bot@users.noreply.github.com" | |
| - name: Move hello-world.md to hello-wurld.md | |
| env: | |
| ROOT: src/fixtures/fixtures | |
| run: | | |
| npm run move-content -- \ | |
| src/fixtures/fixtures/content/get-started/start-your-journey/hello-world.md \ | |
| src/fixtures/fixtures/content/get-started/start-your-journey/hello-wurld.md | |
| npm run test-moved-content -- \ | |
| src/fixtures/fixtures/content/get-started/start-your-journey/hello-world.md \ | |
| src/fixtures/fixtures/content/get-started/start-your-journey/hello-wurld.md | |
| git log | head -n 100 | |
| - name: Move code-security/getting-started to code-security/got-started | |
| env: | |
| ROOT: src/fixtures/fixtures | |
| run: | | |
| npm run move-content -- \ | |
| src/fixtures/fixtures/content/code-security/getting-started \ | |
| src/fixtures/fixtures/content/code-security/got-started | |
| npm run test-moved-content -- \ | |
| src/fixtures/fixtures/content/code-security/getting-started \ | |
| src/fixtures/fixtures/content/code-security/got-started | |
| git log | head -n 100 |