Skip to content
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

Prepare public beta #18

Merged
merged 2 commits into from
Nov 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 4 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,19 @@
name: Deploy

# Uses "pull_request_target" to expose the DEPLOY_KEY secret to PRs from forks in order to allow installing Framework X from a private repository.
# We need to explicitly check out the PR head which may potentially expose the secrets to malicious PR authors.
# Accordingly, we use the DEPLOY_KEY only to clone Framework X and then discard its value before running commands from the Makefile.
# Additionally, the DEPLOY_KEY is limited in scope may change over time.
on:
push:
pull_request_target:
workflow_dispatch:
pull_request:

jobs:
Deploy:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}
- run: mkdir -p ~/.ssh && echo "${{ secrets.DEPLOY_KEY }}" > ~/.ssh/id_rsa && chmod 400 ~/.ssh/id_rsa
- run: git config --global user.name "GitHub Actions" && git config --global user.email "actions@github.com"
- run: git clone git@github.com:clue-access/framework-x.git source/
- run: rm -r ~/.ssh/id_rsa
if: ${{ github.event_name == 'pull_request_target' }}
- run: git clone https://github.com/clue/framework-x.git source/
- run: make
- run: make served
- run: make test
- run: git config --global user.name "GitHub Actions" && git config --global user.email "actions@github.com"
- run: git config --global url."https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/".insteadOf "https://github.com/"
- run: make deploy
if: ${{ github.ref == 'refs/heads/main' && github.event_name != 'pull_request_target' }}
if: ${{ github.ref == 'refs/heads/main' && github.event_name != 'pull_request' }}
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ build:
cp src/* build/src/

pull:
test -d source/ && git -C source/ pull || git clone git@github.com:clue-access/framework-x.git source/
test -d source/ && git -C source/ pull || git clone git@github.com:clue/framework-x.git source/

serve: build
docker run -it --rm -p 8080:80 -v "$$PWD"/build:/usr/local/apache2/htdocs/ httpd:2.4-alpine sh -c \
Expand Down
10 changes: 0 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ You can build the website like this:
$ make
```

> Note that this command will clone Framework X which is currently in early access.
See https://github.com/clue/framework-x for more details.

If you've pulled Framework X before and want to update its source code, you can
pull an up-to-date version and rebuild the website like this:

Expand Down Expand Up @@ -72,10 +69,3 @@ The website can be automatically deployed via the GitHub Pages feature.
Any time a commit is merged (such as when a PR is merged), GitHub actions will
automatically build and deploy the website. This is done by running the above
deployment script (see previous chapter).

> Repository setup:
> Note that this command will clone Framework X which is currently in early access.
> We're using a read-only SSH deploy key for reading from this source repository.
> Make sure the required `DEPLOY_KEY` secret is set in the repository settings on GitHub.
> See [action documentation](https://github.com/JamesIves/github-pages-deploy-action#using-an-ssh-deploy-key-)
> for more details.
71 changes: 48 additions & 23 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,10 @@ <h1 class="mt-4 text-4xl tracking-tight font-extrabold text-white sm:mt-5 sm:lea
<div class="pr-16 sm:text-center sm:px-16">
<p class="font-medium text-white">
<span>
Big news! We're excited to launch our public beta on Tuesday!
Big news! We're excited to announce our public beta!
</span>
<span class="block sm:ml-2 sm:inline-block">
<a href="https://github.com/clue-access/clue-access" class="text-white font-bold underline"> Get early access <span aria-hidden="true">&rarr;</span></a>
<a href="https://github.com/clue/framework-x" class="text-white font-bold underline"> Framework X on GitHub <span aria-hidden="true">&rarr;</span></a>
</span>
</p>
</div>
Expand Down Expand Up @@ -823,17 +823,33 @@ <h2 class="text-base font-semibold tracking-wider text-indigo-600 uppercase">Qui
Get started in seconds
</p>
<p class="mt-5 max-w-prose mx-auto text-xl text-gray-500">
First manually change your <code class="bg-gray-100 px-2 py-1">composer.json</code> to include these lines:
We can start by taking a look at a simple example application.
You can use this example to get started by creating a new <code>public/</code> directory with an <code>index.php</code> file inside:
</p>
</div>
<pre class="text-left mt-12 col-span-full shadow-2xl"><code class="php rounded-md">{
"repositories": [
{
"type": "vcs",
"url": "https://github.com/clue-access/framework-x"
}
]
}
<pre class="text-left mt-12 col-span-full shadow-2xl"><code class="php rounded-md">&lt;?php

require __DIR__ . '/../vendor/autoload.php';

$app = new FrameworkX\App();

$app->get('/', function () {
return new React\Http\Message\Response(
200,
[],
"Hello wörld!\n"
);
});

$app->get('/users/{name}', function (Psr\Http\Message\ServerRequestInterface $request) {
return new React\Http\Message\Response(
200,
[],
"Hello " . $request->getAttribute('name') . "!\n"
);
});

$app->run();
</code></pre>
</div>
</section>
Expand All @@ -846,16 +862,25 @@ <h2 class="text-base font-semibold tracking-wider text-indigo-600 uppercase">Qui
</div>
<pre class="text-left mt-12 col-span-full shadow-2xl"><code class="php rounded-md">$ composer require clue/framework-x:dev-main
</code></pre>
</section>

<section class="mx-auto max-w-md px-4 text-center sm:px-6 sm:max-w-3xl lg:px-8 lg:max-w-7xl">
<div>
<p class="mt-20 mb-10 max-w-prose mx-auto text-xl text-gray-500">
That's it already! You can now run the above example using any existing web server – or even more impressive: using the built-in web server like this:
</p>
</div>
<pre class="text-left mt-12 col-span-full shadow-2xl"><code class="php rounded-md">$ php public/index.php
</code></pre>
<p class="mt-10 mb-10 max-w-prose mx-auto text-xl text-gray-500">
That's it already!
If you also can't wait to finally try it out, get early access to Framework X.
And that’s all it takes! X will now listen for incoming requests using its efficient built-in web server.
Can’t wait to try it out?
</p>
</div>
<div class="pb-24 mt-8 flex justify-center">
<div class="inline-flex rounded-md shadow">
<a href="https://github.com/clue-access/clue-access" class="inline-flex items-center justify-center px-5 py-3 border border-transparent text-base font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-700">
Get early access
<a href="https://github.com/clue/framework-x" class="inline-flex items-center justify-center px-5 py-3 border border-transparent text-base font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-700">
Get Framework X
</a>
</div>
<div class="ml-3 inline-flex">
Expand All @@ -876,8 +901,8 @@ <h2 class="text-base text-white font-semibold tracking-wide uppercase">Open sour
<div class="relative z-10 max-w-prose mx-auto">
<div class="prose prose-indigo text-gray-300 mx-auto lg:max-w-none">
<p>
Framework X will be released as open-source under the permissive MIT license.
This means it will be free as in <em>free speech</em> and as in <em>free beer</em>.
Framework X is released as open-source under the permissive MIT license.
This means it is free as in <em>free speech</em> and as in <em>free beer</em>.
</p>
<p class="mt-4">
We believe in open source and made a conscious decision to take this path.
Expand Down Expand Up @@ -1071,8 +1096,8 @@ <h3 class="mt-8 text-lg font-medium text-gray-900 tracking-tight">Passionate and
</div>
<h3 class="mt-8 text-lg font-medium text-gray-900 tracking-tight">Free community support</h3>
<p class="mt-5 text-base text-left text-gray-500">
We will provide ways to allow users of Framework X to easily exchange information and ideas with each other.
Once released, we will offer a discussion and chat platform to provide direct community support.
We provide ways to allow users of Framework X to easily exchange information and ideas with each other.
We offer a <a href="#community" class="text-indigo-800 hover:underline">discussion and chat platform</a> to provide direct community support.
</p>
</div>
</div>
Expand All @@ -1091,7 +1116,7 @@ <h3 class="mt-8 text-lg font-medium text-gray-900 tracking-tight">Free community
</div>
<h3 class="mt-8 text-lg font-medium text-gray-900 tracking-tight">Get involved</h3>
<p class="mt-5 text-base text-left text-gray-500">
Framework X will be released under the permissive MIT license.
Framework X is released under the permissive MIT license.
You can have an impact on the further development of Framework X at any time.
Join in, tell us about your ideas and leave your fingerprint.
</p>
Expand Down Expand Up @@ -1179,13 +1204,13 @@ <h2 class="text-3xl font-extrabold text-gray-900 text-center">

<div>
<dt class="text-lg leading-6 font-medium text-gray-900">
When will Framework X be released?
When will the first stable version of Framework X be released?
</dt>
<dd class="mt-2 text-base text-gray-500">
Guess what: It’s done when it’s done!
More seriously though, the code is pretty much complete already and is currently undergoing in-depth stress tests.
More seriously though, the code is already pretty complete and released as public beta.
We will use this to process incoming feedback and push Framework X to be even better.
This shouldn’t take too long (<em>pinky swear</em>!).
We’re <a href="#cooperation" class="text-indigo-800 hover:underline">looking for beta users</a>, sounds interesting?
</dd>
</div>

Expand Down