This repository has been archived by the owner on Nov 22, 2024. It is now read-only.
Bump so new copyright year for infosec #111
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Publish Docs | |
on: | |
# Trigger the workflow on push only for the main branch | |
push: | |
branches: | |
- main | |
jobs: | |
build-docs: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- run: | | |
git fetch --no-tags --prune --depth=1 origin +refs/heads/*:refs/remotes/origin/* | |
git fetch --depth=1 origin +refs/tags/*:refs/tags/* | |
- name: Setup java | |
uses: joschi/setup-jdk@v2 | |
with: | |
java-version: 8 | |
architecture: x64 | |
- name: Build documentation | |
run: | | |
sudo snap install yq | |
cd docs | |
make all | |
- name: Publish to cloudflow.io | |
env: | |
CFIO_USER: ${{ secrets.CLOUDFLOWIO_USER }} | |
CFIO_EMAIL: ${{ secrets.CLOUDFLOWIO_EMAIL }} | |
CFIO_TOKEN: ${{ secrets.CLOUDFLOWIO_TOKEN }} | |
run: | | |
git clone https://${CFIO_USER}:${CFIO_TOKEN}@github.com/lightbend/cloudflow.io.git ./cloudflow.io | |
cp -r docs/target/staging/* ./cloudflow.io | |
cp -r core/get.sh ./cloudflow.io/docs/get.sh | |
cd ./cloudflow.io | |
git config user.email "$CFIO_EMAIL" | |
git config user.name "$CFIO_USER" | |
git add . | |
git commit -m "Automated publishing using a Github action on cloudflow-docs" | |
git push "https://${CFIO_USER}:${CFIO_TOKEN}@github.com/lightbend/cloudflow.io.git" | |