test #23
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 | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
repository_dispatch: | |
types: [content-update] | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
token: ${{ secrets.BOT_PAT }} | |
submodules: recursive | |
- name: Get Branch Name | |
shell: bash | |
run: echo "::set-output name=name::$(bash scripts/branchname.sh)" | |
id: branch | |
- name: Build UI | |
id: ui-build | |
run: make ui.build | |
- name: Build Documentation | |
id: antora-build | |
run: | | |
make antora.build | |
touch build/site/.nojekyll | |
- name: Check for Invalid References | |
id: invalid-refs | |
run: bash scripts/invalid_refs.sh || true | |
- name: Modify Paths | |
id: post-process | |
run: bash scripts/remove_path.sh "online-guides/main" | |
- name: Deploy to Github Pages | |
id: deploy-gh | |
if: success() && steps.branch.outputs.name == 'master' | |
uses: crazy-max/ghaction-github-pages@v2 | |
with: | |
target_branch: gh-pages | |
build_dir: build/site | |
keep_history: false | |
fqdn: ${{ secrets.FQDN }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Attach Build Files as Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: html-pack | |
path: build/site/ | |
# - name: Set Redirects | |
# id: set-redirects | |
# if: success() && steps.branch.outputs.name == 'master' | |
# run: bash scripts/redirect_renames.sh | |
# env: | |
# BOT_USER: ${{ secrets.BOT_USER }} | |
# BOT_EMAIL: ${{ secrets.BOT_EMAIL }} | |
# BOT_TOKEN: ${{ secrets.BOT_PAT }} |