From b20c5aa8e2d835d5a7a5f0a20eb34f58ce89da90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20S=C3=A1ros?= Date: Wed, 18 Dec 2024 15:52:35 +0100 Subject: [PATCH] chore: remove netlify from codebase --- .github/workflows/deploy-docs-to-netlify.yml | 27 ---------------- .github/workflows/manual-deploy-docs.yml | 34 -------------------- .github/workflows/release.yml | 28 ---------------- docs/contributor-docs/release.md | 19 ++--------- packages/__docs__/_redirects | 4 --- packages/__docs__/src/Hero/index.tsx | 11 ------- 6 files changed, 2 insertions(+), 121 deletions(-) delete mode 100644 .github/workflows/deploy-docs-to-netlify.yml delete mode 100644 .github/workflows/manual-deploy-docs.yml delete mode 100644 packages/__docs__/_redirects diff --git a/.github/workflows/deploy-docs-to-netlify.yml b/.github/workflows/deploy-docs-to-netlify.yml deleted file mode 100644 index bd7caf2ac9..0000000000 --- a/.github/workflows/deploy-docs-to-netlify.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: Docs deploy to Netlify - on master -on: [workflow_dispatch] -jobs: - deploy: - runs-on: ubuntu-latest - name: Deploy docs to Netlify. - steps: - - uses: actions/checkout@v4 - - name: Install Node 22 - uses: actions/setup-node@v4 - with: - node-version: '22' - - name: Install netlify-cli - run: npm install --save-dev netlify-cli@13.2.2 - - name: Install packages. - run: npm ci - - name: Set up project. - run: npm run bootstrap - - name: Build docs-app. - run: npm run build:docs - - name: Copy redirects config file to the __build__ directory. - run: cp ./packages/__docs__/_redirects ./packages/__docs__/__build__ - - name: Deploy built docs-app to Netlify. - env: - NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} - NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} - run: npx netlify deploy --prod --dir ./packages/__docs__/__build__ diff --git a/.github/workflows/manual-deploy-docs.yml b/.github/workflows/manual-deploy-docs.yml deleted file mode 100644 index 802c10a36b..0000000000 --- a/.github/workflows/manual-deploy-docs.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: Docs deploy to Netlify -on: - workflow_dispatch: - inputs: - docsVersion: - description: 'Version of the Docs to release. Must be in format: vX eg.: v6 v7 ...' - required: true -jobs: - deploy: - runs-on: ubuntu-latest - name: Deploy docs - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: Install Node 22 - uses: actions/setup-node@v4 - with: - node-version: '22' - - name: Install netlify-cli - run: npm install --save-dev netlify-cli@13.2.2 - - name: Install packages. - run: npm ci - - name: Set up project. - run: npm run bootstrap - - name: Build docs-app. - env: - COPY_VERSIONS_JSON: 0 - run: npm run build:docs - - name: Deploy docs-app to netlify - env: - NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} - NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} - run: npx netlify deploy --alias ${{ github.event.inputs.docsVersion }} --dir ./packages/__docs__/__build__ diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 480bd4c642..f1cabb30b7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -43,34 +43,6 @@ jobs: run: git tag -a v$(./.github/workflows/calculateVersion.sh) -m v$(./.github/workflows/calculateVersion.sh) - name: Push tags run: git push origin v$(./.github/workflows/calculateVersion.sh) - deploy-docs: - needs: release - if: "startsWith(github.event.head_commit.message, 'chore(release)')" - runs-on: ubuntu-latest - name: Deploy docs to Netlify - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: Install Node 22 - uses: actions/setup-node@v4 - with: - node-version: '22' - - name: Install netlify-cli - run: npm install --save-dev netlify-cli@13.2.2 - - name: Install packages. - run: npm ci - - name: Set up project. - run: npm run bootstrap - - name: Build docs-app. - run: npm run build:docs - - name: Copy redirects config file to the __build__ directory. - run: cp ./packages/__docs__/_redirects ./packages/__docs__/__build__ - - name: Deploy built docs-app to Netlify. - env: - NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} - NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} - run: npx netlify deploy --prod --dir ./packages/__docs__/__build__ ssr-regression: needs: release runs-on: ubuntu-latest diff --git a/docs/contributor-docs/release.md b/docs/contributor-docs/release.md index ca8a0c1d6d..e977d5bdfd 100644 --- a/docs/contributor-docs/release.md +++ b/docs/contributor-docs/release.md @@ -168,28 +168,13 @@ git push origin v11_maintenance Update the fields in the file `./packages/__docs__/versions.json` with the latest version and the maintenance branch map. Remove old unsupported versions if they are no longer needed and you don't want them to appear in the docs page version selector. -##### 3. Add redirect for the legacy docs - -Add a new line to the file `./packages/__docs__/_redirects` to redirect the legacy docs. If the current major version is 11, then: - -```text ---- -type: code ---- -/v11/* https://v11--preview-instui.netlify.app/:splat 200 -``` - -##### 4. Update version references in the docs app +##### 3. Update version references in the docs app 1. In `docs/getting-started/usage.md` update the version in the code snippet for `package.json` 2. In `packages/__docs__/src/Hero/index.tsx` update the url and title of the Upgrade Guide button 3. In `packages/__docs__/src/Hero/index.tsx` update the url and title of the Upgrade Guide link in the "What's new?" section 4. In `packages/__docs__/src/CodeSandboxButton/index.tsx` update the `@instructure/` dependencies to the latest version -##### 5. Do a release like it was a minor update +##### 4. Do a release like it was a minor update Follow the same process as it's described above. The `npm run bump` command should automatically recognise that there were a breaking commit and it should be a major version change. - -##### 6. Deploy the docs for the maintenance branch - -Make sure that previous versions of the docs are accessible. If not, deploy them on Netlify using the `Docs deploy to Netlify` GitHub action. diff --git a/packages/__docs__/_redirects b/packages/__docs__/_redirects deleted file mode 100644 index 380f91f8e9..0000000000 --- a/packages/__docs__/_redirects +++ /dev/null @@ -1,4 +0,0 @@ -/v6/* https://v6--preview-instui.netlify.app/:splat 200 -/v7/* https://v7--preview-instui.netlify.app/:splat 200 -/v8/* https://v8--preview-instui.netlify.app/:splat 200 -/v9/* https://v9--preview-instui.netlify.app/:splat 200 diff --git a/packages/__docs__/src/Hero/index.tsx b/packages/__docs__/src/Hero/index.tsx index ba936edfe0..137333e060 100644 --- a/packages/__docs__/src/Hero/index.tsx +++ b/packages/__docs__/src/Hero/index.tsx @@ -275,17 +275,6 @@ class Hero extends Component { - - Acknowledgements - - - - Deploys by Netlify - - )