blob: b8d9e240dcdfe9e0b69d7273835b2f51730b9a6d [file] [log] [blame]
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: Publish Daffodil Site
on: [push]
jobs:
test:
name: Publish Site
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: Checkout Repository
uses: actions/checkout@v1.0.0
- name: Install Ruby
uses: actions/setup-ruby@v1
with:
ruby-version: '2.6'
- name: Install Python
uses: actions/setup-python@v1
with:
python-version: '3.5'
- name: Install Dependencies
run: |
sudo apt-get install graphviz
bundle install
python -m pip install --upgrade pip
pip install blockdiag
pip install seqdiag
pip install actdiag
pip install nwdiag
- name: Build
run: |
jekyll clean --source site
jekyll build --source site
- name: Publish
if: ${{ github.repository == 'apache/daffodil-site' && github.ref == 'refs/heads/master' }}
run: |
git checkout asf-site
rm -rf content
mv target content
git add content
git config --local user.email "${{ github.event.head_commit.committer.email }}"
git config --local user.name "${{ github.event.head_commit.committer.name }}"
git commit -a --allow-empty -m "Publishing from ${{ github.sha }}"
git push --force "https://${{ github.actor }}:${{ github.token }}@github.com/${{ github.repository }}.git" asf-site