Skip to content

Commit 0baac1d

Browse files
committed
Use GitHub actions for continuous integration (CI)
Bye bye Travis CI, you've served us well.
1 parent 4e5d155 commit 0baac1d

File tree

4 files changed

+32
-43
lines changed

4 files changed

+32
-43
lines changed

.github/workflows/ci.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Deploy
2+
3+
on:
4+
push:
5+
workflow_dispatch:
6+
7+
jobs:
8+
Deploy:
9+
runs-on: ubuntu-20.04
10+
steps:
11+
- uses: actions/checkout@v2
12+
- uses: shivammathur/setup-php@v2
13+
with:
14+
php-version: 7.1
15+
- run: composer install
16+
- run: mkdir ~/.ssh && echo "${{ secrets.DEPLOY_KEY }}" > ~/.ssh/id_rsa && chmod 400 ~/.ssh/id_rsa
17+
- run: echo 'GITHUB_TOKEN="${{ secrets.GITHUB_TOKEN }}"' > .env && cat .env.dist >> .env
18+
- run: git config --global user.name "GitHub Actions" && git config --global user.email "[email protected]"
19+
- run: bin/build --deploy

.travis.yml

Lines changed: 0 additions & 34 deletions
This file was deleted.

README.md

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Website
22

3+
[![CI status](https://github.com/reactphp/website/workflows/CI/badge.svg)](https://github.com/reactphp/website/actions)
4+
35
Source code of reactphp.org.
46

57
## Setup
@@ -63,16 +65,19 @@ Note that this will publish any changes you've made to your local repository,
6365
including any uncommitted ones. There should usually be no need to do this
6466
manually, see next chapter for auto-deployment.
6567

66-
## Auto-Deployment with Travis CI
68+
## Auto-Deployment
69+
70+
The website can be automatically deployed via the GitHub Pages feature.
6771

68-
The website can be automatically deployed via the Travis CI
69-
[GitHub Pages Deployment](https://docs.travis-ci.com/user/deployment/pages/)
70-
feature.
72+
Any time a commit is merged (such as when a PR is merged), GitHub actions will
73+
automatically build and deploy the website. This is done by running the above
74+
deployment script (see previous chapter).
7175

72-
Make sure, the required environment variables are set in the repository settings
73-
on Travis CI: `GITHUB_TOKEN`
74-
([a personal access token](https://docs.travis-ci.com/user/deployment/pages/#Setting-the-GitHub-token)),
75-
`DEPLOY_REPO`, `DEPLOY_TARGET_BRANCH` and `DEPLOY_FQDN`.
76+
> Repository setup:
77+
> We're using a SSH deploy key for pushing to this target repository.
78+
> Make sure the required `DEPLOY_KEY` secret is set in the repository settings on GitHub.
79+
> See [action documentation](https://github.com/JamesIves/github-pages-deploy-action#using-an-ssh-deploy-key-)
80+
> for more details.
7681
7782
## License
7883

bin/build

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ call_user_func(include $configFile, $container);
1616
function run($command, $cwd = null)
1717
{
1818
$process = new Symfony\Component\Process\Process($command, $cwd);
19-
$process->setTty(true);
2019

2120
$process->mustRun(function ($type, $buffer) {
2221
echo $buffer;

0 commit comments

Comments
 (0)