Skip to content

Commit

Permalink
Merge pull request #37 from clue-labs/deploy
Browse files Browse the repository at this point in the history
Update deployment instructions
  • Loading branch information
SimonFrings authored Sep 11, 2023
2 parents d28410f + 3d7b472 commit 27defaa
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 20 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ on:

jobs:
Deploy:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- run: git clone https://github.com/clue/framework-x.git source/
- run: make
- run: make served
Expand Down
34 changes: 17 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
# Framework X website

[![CI status](https://github.com/clue/framework-x-website/workflows/Deploy/badge.svg)](https://github.com/clue/framework-x-website/actions)
[![CI status](https://github.com/clue/framework-x-website/actions/workflows/ci.yml/badge.svg)](https://github.com/clue/framework-x-website/actions)
[![Last deployed on `live`](https://img.shields.io/github/last-commit/clue/framework-x-website/live?label=last%20deployed&logo=github)](https://github.com/clue/framework-x-website/tree/live)

Source code for the Framework X website.

See https://github.com/clue/framework-x for more details about Framework X.
Source code for the https://framework-x.org/ website.

## Contribute

Expand All @@ -23,36 +21,35 @@ Just locate the `public/index.html` and there you will find all contents.
You can build the website like this:

```bash
$ make
make
```

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:
rebuild the website after pulling an up-to-date version like this:

```bash
$ make pull
$ make
make pull
```

Once built, you can manually browse the `build/` directory or run the web server
container (Apache) in the foreground like this:

```bash
$ make serve
make serve
```

Alternatively, you may also run the web server container (Apache) as a
background daemon like this:

```bash
$ make served
make served
```

Once running, you can run some integration tests that check correct paths etc.
like this:

```bash
$ make test
make test
```

Once done, you can clean up like this:
Expand All @@ -70,18 +67,21 @@ The live website is deployed by pushing the contents of the `build/` directory t
the `live` branch like this:

```bash
$ make deploy
make deploy
```

As a prerequisite, this should be deployed behind a CDN (Bunny CDN) that is
responsible for HTTPS certificate handling and forcing HTTPS redirects. This CDN
needs to be configured to pass the `X-Forwarded-Scheme` and `X-Forwarded-Host` HTTP
request headers to avoid exposing the origin URL in any HTTP redirects.

## Auto-Deployment
## Continuous Deployment

The website can be automatically deployed via the GitHub Pages feature.
We use continuous deployment to keep this website up to date. Any time a commit
is pushed (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).

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).
Additionally, the same deployment is triggered whenever a commit is pushed in
[clue/framework-x](https://github.com/clue/framework-x). This ensures the
website is automatically rebuilt whenever documentation changes have been merged.
2 changes: 1 addition & 1 deletion tests/acceptance.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ match -iP "Location: https://example\.com/docs/[\r\n]"

out=$(curl -v $base/docs/ -H 'X-Forwarded-Host: example.com' -H 'X-Forwarded-Proto: http' 2>&1);
match "HTTP/.* 302"
skipif -iP "Location: $base/docs/[\r\n]" &&
skipif -iP "Location: $base/docs/getting-started/[\r\n]" &&
match -iP "Location: http://example\.com/docs/getting-started/[\r\n]"

out=$(curl -v $base/docs/getting-started/ 2>&1); match "HTTP/.* 302" && match -iP "Location: .*/docs/getting-started/quickstart/[\r\n]"
Expand Down

0 comments on commit 27defaa

Please sign in to comment.