-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: add older versions to gh pages deploy #1697
Open
joyenjoyer
wants to merge
1
commit into
master
Choose a base branch
from
gh_pages_deployment
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,40 @@ | ||
name: Deploy docs from master commit to gh pages | ||
name: Deploy docs to gh-pages | ||
on: | ||
push: | ||
branches: | ||
- master | ||
- v8_maintenance | ||
- v9_maintenance | ||
workflow_dispatch: | ||
jobs: | ||
deploy-docs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- run: npm ci && npm run bootstrap | ||
# Conditional build depending on branch | ||
- name: Set build directory based on branch | ||
id: set-build-dir | ||
run: | | ||
if [ "${{ github.ref }}" == "refs/heads/master" ]; then | ||
echo "::set-output name=build_dir::./packages/__docs__/__build__" | ||
echo "::set-output name=deploy_dir::./" | ||
elif [ "${{ github.ref }}" == "refs/heads/v8_maintenance" ]; then | ||
echo "::set-output name=build_dir::./packages/__docs__/__build__" | ||
echo "::set-output name=deploy_dir::v8" | ||
elif [ "${{ github.ref }}" == "refs/heads/v9_maintenance" ]; then | ||
echo "::set-output name=build_dir::./packages/__docs__/__build__" | ||
echo "::set-output name=deploy_dir::v9" | ||
fi | ||
- name: Build docs-app | ||
run: npm run build:docs | ||
- uses: JamesIves/github-pages-deploy-action@v4 | ||
- name: Copy redirects config file to the __build__ directory. | ||
run: cp ./packages/__docs__/_redirects_gh_pages ./packages/__docs__/__build__ | ||
- name: Deploy to GitHub Pages | ||
uses: JamesIves/github-pages-deploy-action@v4 | ||
with: | ||
folder: ./packages/__docs__/__build__ | ||
folder: ${{ steps.set-build-dir.outputs.build_dir }} | ||
branch: gh-pages | ||
target-folder: ${{ steps.set-build-dir.outputs.deploy_dir }} | ||
clean-exclude: pr-preview | ||
force: false |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/v6/* https://instructure.github.io/instructure-ui/v6:splat 200 | ||
/v7/* https://instructure.github.io/instructure-ui/v7:splat 200 | ||
/v8/* https://instructure.github.io/instructure-ui/v8:splat 200 | ||
/v9/* https://instructure.github.io/instructure-ui/v9:splat 200 |
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
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Check failure
Code scanning / CodeQL
Incomplete URL substring sanitization High
Copilot Autofix AI 9 days ago
To fix the problem, we need to replace the substring check with a more secure method of validating the host of the URL. We will use the
URL
constructor to parse the URL and then check the host directly. This ensures that the check is performed on the correct part of the URL and cannot be bypassed by embedding the allowed host in an unexpected location.URL
constructor.hostname
property of the parsed URL to determine if it matchesgithub.io
.