Skip to content

Commit

Permalink
Replaces Travis with GitHub Actions
Browse files Browse the repository at this point in the history
This removes the Travis descriptor and builds using GitHub actions and builds daily

Add instructions on how to deploy to Github pages locally
  • Loading branch information
gastaldi committed Nov 12, 2020
1 parent 2c20cc0 commit 220a33e
Show file tree
Hide file tree
Showing 5 changed files with 72 additions and 32 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/deploy.yml
@@ -0,0 +1,25 @@
name: Build and deploy to GitHub Pages

on:
schedule:
- cron: '0 0 * * *'
push:
branches:
- develop
jobs:
deploy:
runs-on: ubuntu-16.04
steps:
- uses: actions/checkout@v2

# Use GitHub Actions' cache to shorten build times and decrease load on servers
- uses: actions/cache@v1
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gems-
- uses: helaili/jekyll-action@2.0.4
env:
JEKYLL_PAT: ${{ secrets.GITHUB_TOKEN }}
38 changes: 38 additions & 0 deletions .github/workflows/preview.yml
@@ -0,0 +1,38 @@
name: Surge.sh Preview

on:
pull_request_target:
# when using teardown: 'true', add default event types + closed event type
types: [opened, synchronize, reopened, closed]
pull_request:
branches:
- develop
jobs:
preview:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

# Use GitHub Actions' cache to shorten build times and decrease load on servers
- uses: actions/cache@v2.1.3
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gems-
- name: Build Jekyll site
uses: jerryjvl/jekyll-build-action@v1

- uses: afc163/surge-preview@v1
id: preview_step
with:
surge_token: ${{ secrets.SURGE_TOKEN }}
github_token: ${{ secrets.GITHUB_TOKEN }}
dist: _site
teardown: 'true'
build: |
echo Deploying to surge.sh
- name: Get the preview_url
run: echo "url => ${{ steps.preview_step.outputs.preview_url }}"
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -8,6 +8,7 @@ _site
_bin
setup.sh
.project
.env

# Vim temp files
*.swp
Expand Down
31 changes: 0 additions & 31 deletions .travis.yml

This file was deleted.

9 changes: 8 additions & 1 deletion README.md
Expand Up @@ -32,9 +32,16 @@ These instructions will get you a copy of the Quarkus.io website up and running

> If you encounter any unexpected errors during the above, please refer to the [troubleshooting](https://jekyllrb.com/docs/troubleshooting/#configuration-problems) page or the [requirements](https://jekyllrb.com/docs/installation/#requirements) page, as you might be missing development headers or other prerequisites.

**For more regarding the use of Jekyll, please refer to the [Jekyll Step by Step Tutorial](https://jekyllrb.com/docs/step-by-step/01-setup/).**

### Deploying to Github Pages
The website deployment is automatically performed by GitHub Actions (when commits are pushed to the `develop` branch).
If for some reason you need to deploy from your local machine, follow these instructions:

1. Install the [act](https://github.com/nektos/act#installation) executable to run GitHub Actions locally
2. Run `act -s GITHUB_TOKEN=<GITHUB_TOKEN>`, where *<GITHUB_TOKEN>* needs to be replaced with a token that allows you to push to the https://github.com/quarkusio/quarkusio.github.io repository.


## Writing a blog

To write a blog:
Expand Down

0 comments on commit 220a33e

Please sign in to comment.