Skip to content

Accessibility improvement #23

Accessibility improvement

Accessibility improvement #23

name: Docker
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
# Use docker.io for Docker Hub if empty
REGISTRY: ghcr.io
# github.repository as <account>/<repo>
IMAGE_NAME: "scj2000-web"
jobs:
build-and-publish-latest:
name: "Build and publish Docker image"
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main' # Running this job only for main branch
steps:
- uses: actions/checkout@v4 # Checking out the repo
- name: Build and Publish "latest" Docker image
uses: VaultVulp/gp-docker-action@1.6.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }} # Provide GITHUB_TOKEN to login into the GitHub Packages
image-name: ${{ env.IMAGE_NAME }}
build-context: ./scj2000-web
dockerfile: Dockerfile
trigger-dispatch-cfpages:
name: "Triger to generate static HTML site"
needs: build-and-publish-latest
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main' # Running this job only for main branch
steps:
- name: Repository Dispatch
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.PAT }}
repository: scj2000/scj2000-web-cfpages
event-type: webhook