-
Notifications
You must be signed in to change notification settings - Fork 6
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
NEW Move deployment to GitHub Pages #142
NEW Move deployment to GitHub Pages #142
Conversation
@GuySartorelli is attempting to deploy a commit to the SilverStripe Team on Vercel. A member of the Team first needs to authorize it. |
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | ||
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | ||
concurrency: | ||
group: "gh-pages" | ||
cancel-in-progress: false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't strictly necessary, but it was shown in the documentation and seems like a good safeguard to ensure we don't get into a broken state if one action is interrupted and then the subsequent one fails, or something like that.
runs-on: ubuntu-latest | ||
if: github.repository_owner == 'silverstripe' | ||
permissions: | ||
contents: read |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needed for code checkout
permissions: | ||
pages: write | ||
id-token: write |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These permissions are documented at https://github.com/actions/deploy-pages?tab=readme-ov-file#security-considerations
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file was only for vercel
You can use it on https://github-issue-search-client-silverstripe.vercel.app. | ||
You can use it on <https://silverstripe.github.io/github-issue-search-client/>. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This URL will change again once we have a solid subdomain - but it's better than having the vercel URL here in the meantime.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just removing the "powered by Vercel" link
@@ -8,5 +8,6 @@ module.exports = { | |||
apollo: { | |||
lintGQL: false | |||
} | |||
} | |||
}, | |||
publicPath: "./" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Required for the script and style tags to use relative paths, which is necessary for them to load at all in GitHub Pages (at least until we have a solid subdomain - but even then relative will work)
run: | | ||
cat << EOF > .env | ||
VUE_APP_GRAPHQL_ENDPOINT=https://api.github.com/graphql | ||
VUE_APP_GRAPHQL_TOKEN=${{ secrets.GRAPHQL_TOKEN_FOR_GH_PAGES }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've moved the same token that Vercel was using into the secrets for this repository.
Note that this token has always been made public by being included in the dist *.js files, so there's no change in attack surface by including it here like this. The .env file isn't included in the artifacts and therefore isn't in the GitHub Pages result - but the token will will be in the dist *.js files as it always has been.
Description
Adds a new workflow to build and deploy to GitHub Actions, removes references to Vercel, and makes a small change necessary for the site to work in its new hosting.
Manual testing steps
You can try this out in your own account if you want - but here's one I prepared earlier and here's the deployment
Issues