Main page formatting #41
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: | |
- main | |
tags: | |
- "v*" | |
paths-ignore: | |
- "README.adoc" | |
permissions: | |
packages: write | |
contents: write | |
concurrency: | |
group: build | |
cancel-in-progress: false | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
- name: set datetime | |
run: | | |
echo "datetime=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_ENV | |
- name: log in registry.redhat.io | |
uses: redhat-actions/podman-login@v1 | |
with: | |
registry: registry.redhat.io | |
username: ${{ secrets.REGISTRY_REDHAT_IO_USER }} | |
password: ${{ secrets.REGISTRY_REDHAT_IO_PASSWORD }} | |
- name: build image | |
id: build-image | |
uses: redhat-actions/buildah-build@v2 | |
with: | |
image: inner-outer-guides | |
tags: latest ${{ github.ref_name }} | |
dockerfiles: | | |
./Dockerfile | |
build-args: | | |
CREATED_AT=${{ env.datetime }} | |
GITHUB_SHA=${{ github.sha }} | |
- name: push image to ghcr.io | |
uses: redhat-actions/push-to-registry@v2 | |
with: | |
image: ${{ steps.build-image.outputs.image }} | |
tags: ${{ steps.build-image.outputs.tags }} | |
registry: ghcr.io/redhat-scholars | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
build-publish-site: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout project | |
uses: actions/checkout@v2 | |
- name: Run antora | |
uses: docker://antora/antora:3.1.2 | |
with: | |
args: site-gh-pages.yml | |
- name: Deploy to GitHub Pages | |
uses: JamesIves/github-pages-deploy-action@releases/v3 | |
with: | |
GITHUB_TOKEN: "${{github.token}}" | |
FOLDER: gh-pages | |
BRANCH: gh-pages | |
COMMIT_MESSAGE: "[docs] Publishing the docs for commit(s) ${{github.sha}}" |