blob: b7b08e9022ec379dd3b11172c93b1b921b14e18e [file] [log] [blame]
name: Compilation of the Webpage
on:
push
jobs:
jekyll:
runs-on: ubuntu-16.04
env:
URL: ${{ secrets.URL }}
BASE_URL: ${{ secrets.BASE_URL }}
steps:
- uses: actions/checkout@v2
- name: update_url
run : |
URL="${URL:='https://wayang.apache.org'}" # If variable not set or null, set it to default.
BASE_URL="${BASE_URL:='/'}" # If variable not set or null, set it to default.
echo "${URL}"
echo "${BASE_URL}"
cat _config.yml
echo "url: \"${URL}\"" > _config.yml.tmp
echo "baseurl: \"${BASE_URL}\"" >> _config.yml.tmp
cat _config.yml | grep -v "url:" >> _config.yml.tmp
mv _config.yml.tmp _config.yml
echo ""
echo ""
cat _config.yml
# Use GitHub Actions' cache to shorten build times and decrease load on servers
- name: cache
uses: actions/cache@v2
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile') }}
restore-keys: |
${{ runner.os }}-gems-
# Specify the target branch
- name: publish
uses: helaili/jekyll-action@v2
with:
token: ${{ secrets.TOKEN_SECURITY }}
target_branch: 'gh-pages'